Program that prints first 100 integers (using while loop)
c++ programs
Source code:
#include<iostream>// iostream provides basic
// input and output services for C++ programs
#include<conio.h>
using namespace std;
int main()// Th execution of program start with the main function
{
cout<<"\n The first hundred integers are as follows :"<<endl;
// cout is used to display
// the same statement in the output.
int count=1;
while(count<=100) // while loop
{
cout<<" "<<count;
count++;
}
return 0;
}
0 Comments