Το πρόγραμμα,εκτυπώνει 5 τυχαίους αριθμούς από το 1-99!
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
int x;
srand(time(NULL));
cout<<"5 arithmoi :"<<endl;
for (int i=1; i<=5; i++)
{
x=rand()%99+1;
cout<<x<<endl;
}
}
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου