//WAP using for loop to print numbers from 1 to 10.

//WAP using for loop to print numbers from 1 to 10.
#include<iostream.h>
#include<stdlib.h>
int main()
{
      system("cls");
      int i;      //declaring variable i
      for(i=1;i<=10;++i)
            cout<<i<<"\t";
      return 0;
}



OUTPUT

Comments

Popular posts from this blog

WAP using a class to store price list of 5 items and to print the largest prices as well as the sum of all prices.

WAP that obtains the rotation factor and rotates the array as per it.

WAP to get roll numbers and marks of the student of a class (get from the user) and store these details into a file called Marks.dat