print table of n using while loop
#include<iostream> using namespace std; int main() { int a=1,no,table=1; cout<<"Enter any number: "; cin>>no; while(a<=10) { table=a*no; cout<<table; cout<<"\n"; a++; } return 0; }
#include<iostream> using namespace std; int main() { int a=1,no,table=1; cout<<"Enter any number: "; cin>>no; while(a<=10) { table=a*no; cout<<table; cout<<"\n"; a++; } return 0; }
Comments
Post a Comment