for(a;a<3;a--)
So say you enter 2 for a, when will this loop ever end?
But the actual problem noted by the compiler is the first part, the initialization section. You either need to initialize the variable or leave that section blank.
#include<iostream>
#include<cstdlib>
#include<ctime>
usingnamespace std;
int fun(int x,int y); // declares function fun
int main()
{
int a,b;
cin>>a>>b;
cout<<odai(a,b); // uses undefined function. Maybe you meant fun() function to be called
cout<<endl;
cout<<a<<b; // Next applies above too
cout<<endl; // These 2 lines can be written: cout << a << b << endl;
for(a;a<3;a--)
{
cout<<rand(); // If you want to use rand() as "real" randomizer, give it a seed
}
system("pause");
return 0;
}
int fun(int x,int y)
{
return x*y;
}