Print Integer in C++


Q. Write a C++ program to print 100 integer number.

#include <iostream>           
using namespace std;
  
int main()
{  
	int i;
	cout << "Print first 100 integer number :" ;
	for (i = 1; i <= 100; i++)
	{
		cout << i;
	}
  	return 0;
}

Q. Write an algorithm to print 100 integer number.

Step 1. Start
Step 2. Declare an integer variable `i`.
Step 3. Output the message: "Print first 100 integer number :".
Step 4. For `i` from 1 to 100 (inclusive):
        - Print the value of `i`.
Step 5. End



OnlineTpoint is a website that is meant to offer basic knowledge, practice and learning materials. Though all the examples have been tested and verified, we cannot ensure the correctness or completeness of all the information on our website. All contents published on this website are subject to copyright and are owned by OnlineTpoint. By using this website, you agree that you have read and understood our Terms of Use, Cookie Policy and Privacy Policy.