answersLogoWhite

0

#include

void main()

{

int i=2,m,n;

printf("enter number");

scanf("%d",&n);

do

{

m=i*n;

printf("%d*%d=%d\n",n,i,m);

i=i+1;

}

while (i<=10);

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

Making multiplication table in c plus plus using do while loop?

Um, not sure how to do that, but you can create a sort of "table" in C++ by using multidimensional arrays. Below is an example of how to create a two-dimensional array: int myArray[10] [10]; You can add more dimensions to the array in order to increase its storage capacity.


How do you make a program in python using do while loop to display the multiplication table of number from one to ten?

a = 0while a < 10 :a += 1print (a)Write the above simple script in a text editor (I use nano). Save as loop.py in home folder. To run, open a terminal and at the prompt, write: python loop.pyResult:rodney@downstairs:~$ python loop.py12345678910


What is main different between do while and while?

If you want to execute a statement which is in while loop at least one time you can use do- while loop. this is why because initially first statements will be executed then condition will be checked. but in case of while first condition will be check then statements will be executed


How Write javascript program to display multiplication table of 2 without accepting input from user?

Use a counted for loop. On each iteration, multiply the control variable by 2 and print the result.


Compare Do-While with While Statements?

A Do-While loop looks like this: do { loop body } while (condition); and a While loop looks like this: while (condition) { loop body } The main difference is that the loop body is always run once in the Do-While loop, then the condition is checked to see if the loop should keep running. In a While loop, the condition is checked first, and it will not run the loop body at all if the condition is false.

Related Questions

Write a algorithm for multiplication tabel for an integer?

Algorithm: 1. From the user collect the integer whose table is required 2. Use a loop with loop counter starting with 0x01 and ends till the table value is required 3. start multiplication the input number with the loop variable and print the result.


Making multiplication table in c plus plus using do while loop?

Um, not sure how to do that, but you can create a sort of "table" in C++ by using multidimensional arrays. Below is an example of how to create a two-dimensional array: int myArray[10] [10]; You can add more dimensions to the array in order to increase its storage capacity.


What is the time complexity of using a while loop inside a for loop?

The time complexity of using a while loop inside a for loop is O(nm), where n is the number of iterations of the for loop and m is the number of iterations of the while loop.


How do you calculate loop length?

the multiplication of the number of iterations with the number of statements in that loop is equal to loop length.


How do you make a program in python using do while loop to display the multiplication table of number from one to ten?

a = 0while a < 10 :a += 1print (a)Write the above simple script in a text editor (I use nano). Save as loop.py in home folder. To run, open a terminal and at the prompt, write: python loop.pyResult:rodney@downstairs:~$ python loop.py12345678910


How do you perform multiplication of two numbers without using the multiplication operator?

By using repeated addition. Consider two numbers a and b. If you want to find a*b then you can add the numbers repeatedly in a loop to get the product. Eg:product = a;for( i=1; i


C program that prints out multiplication table of any given numbers?

/*mycfiles.wordpress.com Program to prepare Table of any no. using while loop*/ #include #include void main() { int n,t,count=1; clrscr(); printf("Enter any number\n\n"); scanf("%d",&amp;n); while(count&lt;=10) { t=n*count; printf("\n%d*%d=%d",n,count,t); count++; } getch(); }


What is the syntax for writing a loop in pseudo code?

The syntax for writing a loop in pseudo code typically involves using keywords like &quot;for&quot;, &quot;while&quot;, or &quot;do-while&quot; to indicate the type of loop, followed by the loop condition and the code block to be executed within the loop.


What is main different between do while and while?

If you want to execute a statement which is in while loop at least one time you can use do- while loop. this is why because initially first statements will be executed then condition will be checked. but in case of while first condition will be check then statements will be executed


What is a nested loop in java?

A nested loop is a (inner) loop that appears in the loop body of another (outer) loop. The inner or outer loop can be any type: while, do while, or for. For example, the inner loop can be a while loop while an outer loop can be a for loop.


How do you get the ouput as 11111 using while loop?

int i = 0; while( (i++) &lt; 5 ) { printf("1"); }


What are the similarities of while loop and a do while loop?

They both loop