hello my friends
i have a problem with generating random number.
i wrote this program
#include "stdafx.h"
#include <iostream>
using namespace std;
int main ()
{
for(int c=1;c<=20;c++)
{
cout<<1+rand()%6;
if(c%5==0)
cout<<endl;
}
}
but its generated so many numbers,i want to write a program to generate one random number each time for me.
i want this program for <<DICE>>.
please help me.
Thank You.
in fact i want a program that recieve number from 1 to 100 from user,and give user a number between 1 to 6.
look at the program i wrote
that program generated 6 or more random number.
i want a program that generate and make 1 number eachtime.
sorry for my english.