- 1
5 table
what is the coding of table of 5 in c++
3 Answers
+ 1
<#include iostream.h>
void main()
{ int i=1;
for(i=1;i<11;i++)
{
cout<<(5*i);
return 0;
}
}
+ 1
#include <iostream>
using namespace std;
int main()
{
int num,i;
cout<<"Enter a number:\n ";
cin>>num;
cout<<"Entered number:"<<num<<endl;
for(i=1;i<11;i++)
{
cout<<num*i<<endl;
}
return 0;
}
0
#include<iostream>
using namespace std:
int main()
{
int num,i;
cout<<"Enter the number for which the table is to be shown:";
cin>>num
for(i=1;i<=10;i++)
{
cout<<num<<"x"<<i<<"="<<num*i;
}
return 0;
}