Question #265825

Write a program using a for loop to print the table of any given number till 10


Expert's answer

#include <iostream>
#include <iomanip>


using namespace std;




int main()
{
	int number;
	cout<<"Enter the number: ";
	cin>>number;
	
	for(int i=1;i<=10;i++){
		cout<<number<<" X "<<i<<" = "<<(i*number)<<"\n";	
	}


	cin>>number;
	return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS