Darnit!!!
For some reason it goes ahead and skips the amount of times its supposed to loop. Heres the code. Try your best to reply as fast as you can!!
Code
#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
int main()
{
int time = 0;
char name[500];
int times;
clrscr();
cout<<"First type a sentence>";
cin>>name[500];
cout<<"Now type the number of times you want your sentence to appear>";
cin>>times; //It just aint readin dis
cout<<"Good, now press a key and sit back.......";
getch();
clrscr();
while (time != times)
{
time = time + 1;
int x = rand() % 80;
int y = rand() % 24;
gotoxy(x, y);
cout<<name;
}
getch();
return 0;
}
please help me