Computer Science, asked by Rahulrathore1, 1 year ago

print a table of seven by using c++

Answers

Answered by ANURAGSETH20
0
#include<iostream.h>
#include<conio.h>

void main()
{
int i,no,table=1;
clrscr();
cout<<"Enter any num : ";
cin>>no;
clrscr();
cout<<"Table of "<<no;
for(i=1;i< =10;i++)
{
table=no*i;
cout<<" \n"<<table;
cout<<"\n";
}
getch();
}

This will u to get table of any no.

HOPE THIS WILL HELP
MARK THIS AS BRAINLIST.
Answered by codiepienagoya
0

Print table of 7:

Output:

7

14

21

28

35

42

49

56

63

70

Explanation:

program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

   int n=7,i=1; //defining variable

   while(i<=10) //defining loop for calculate table

   {

       cout<<n*i<<endl; //print value

       i++; //increment the value of i

   }

   return 0;

}

Description of the code:

  • In the above C++ language code, first header file include, then the main method is defined.
  • In the next step. an integer variable "n and i", is declared in which we assign a value that is "7 and 1".
  • Then, a while loop is declared, inside this loop a print method is used, that prints the multiple of sever and increment the value of i.

Learn more:

  • Print table: https://brainly.in/question/15218629
Similar questions