How to make a table in c++:-
I also tell you about write the table using c++ before,But now i tell you a different method to write your desired table in c++ using while loop in c++. So try this it is very simple to learn.
#include<iostream.h>
#include<conio.h>
main()
{
int x,y,z;
y=1;
cout<<"enter the value for which you want the table:";
cin>>x;
cout<<"enter the value up to which you want the table:";
cin>>z;
while(y<=z)
{
cout<<x<<"*"<<y<<"="<<y*x<<endl;
y=y+1;
}
getch();
}
End
No comments:
Post a Comment