Write a program using a for loop to print the table of any given number till 10
#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;
}
Comments
Leave a comment