Daisypath Anniversary tickers

Daisypath Anniversary tickers

Saturday, March 26, 2011

FOR LOOP & WHILE LOOP..... HULAHOOOOPPP.....

FOR LOOP...

#include
main()
{
//declare variable
int x,y;
cout<<"Enter an integer=";
cin>>x;
//loop for
for(y=1;y< x;y++)
{
cout<<" "<}
return 0;
}

WHILE LOOP...

#include
main()
{
//declare variable
int x,y;
cout<<"Enter an integer=";
cin>>x;
//while
y=x;
while(y{
cout<<" "<y++;
}
return 0;
}

No comments:

Post a Comment