Convert to C language   #include using namespace std; //hash function 2 int main() {     int n;     cout << "enter number\n";     cin >> n;     //f(n)=rand()*n     cout << n << "->" << (rand() * n) % 10;     return 0; }   Output:

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 3.5CP
icon
Related questions
Question

Convert to C language

 

#include <bits/stdc++.h>
using namespace std;

//hash function 2
int main()
{
    int n;
    cout << "enter number\n";
    cin >> n;

    //f(n)=rand()*n
    cout << n << "->" << (rand() * n) % 10;

    return 0;
}

 

Output:

 

enter number
103456
103456->2
Transcribed Image Text:enter number 103456 103456->2
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer