rand in c++
#include <iostream>
using namespace std;
int main()
{
// 1+(rand()%10)
cout<< 1+(rand()%10) <<endl;
for (int i=1;i<=5;i++)
{
cout<<1+(rand()%10)<<endl;
}
}
#include <iostream>
using namespace std;
int main()
{
// 1+(rand()%10)
cout<< 1+(rand()%10) <<endl;
for (int i=1;i<=5;i++)
{
cout<<1+(rand()%10)<<endl;
}
}