answersLogoWhite

0


Best Answer

The for loop looks like this:

for (i = 1; i <= 10; i++)

{

...

}

This will repeat anything inside ten times; the variable "i" will have the values 1, 2, ...10. The first part is the initial assignment, the second part specifies a condition - while it is true, the loop should continue, and the third part increments the variable(s).

Replace the "..." with anything you want to repeat 10 times, for example, a System.out.println(...) that involves the variable "i".

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

#include // This code multiplies all the numbers from 1 to 10 together. // If you just wanted a specific number, replace the outer for loop with (for example) i=5; .

int main(){

int i, j;

for(i=1;i

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Hey Guys this is bharat from hyderabad.Heres a simple Multiplication table to get a table by just giving the number at runtime you want to get:

Ans 3 :

import java.util.*;

public class MultiplicationTable {

static public void main(String[] ar) {

Scanner sc=new Scanner(System.in);

System.out.println("please enter the number");

int n=sc.nextInt();

System.out.println("Multiplication table : ");

for(int i=1;i<=10;i++) {

System.out.println(n+"*"+i+"="+(n*i));

}

}

}

Ans. 1. This works, but isn't very pretty, especially when printed in variable-width fonts. Play with the format to get it to look the way you like.

// pre-print column headers

System.out.print(" ");

for (int c = 0; c <= 10; ++c) {

System.out.format("%4d", c);

}

System.out.println();

System.out.print(" ");

for (int c = 0; c <= 10; ++c) {

System.out.format(" -");

}

System.out.println();

// calculations

for (int r = 0; r <= 10; ++r) {

// row headers

System.out.format("%2d|", r);

// calculation for the current row

for (int c = 0; c <= 10; ++c) {

System.out.format("%4d", (r * c));

}

System.out.println();

}

Ans.2 :

class table

{

public static void main(String args[])

int n=2;

System.out.println("Table of " + n + " is :");

int result;

for (int a = 1; a <= 10; a++)

{

result = n * a;

System.out.println(result);

}

}

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

#include
#include
void main()
{
int i,j;
clrscr();
for(i=1;i<=10;i++)
{
for(j=1;j<=10;j++)
{
printf("%3d",i*j);
}
printf("\n");
}
getch();
}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c,d,e,f,g,h,i,j;

printf("Enter a number=");

scanf("\n%d",&a);

b=a*2,c=a*3,d=a*4,e=a*5,f=a*6,g=a*7,h=a*8,i=a*9,j=a*10;

printf("%d",a);

printf("\n%d",b);

printf("\n%d",c);

printf("\n%d",d);

printf("\n%d",e);

printf("\n%d",f);

printf("\n%d",g);

printf("\n%d",h);

printf("\n%d",i);

printf("\n%d",j);

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

#include<conio.h>

#include<stdio.h>

void main()

{

int no;

clrscr();

printf("enter the number==>");

scanf("\t%d",

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

I will write some pseudocode, I suppose that counts as an algorithm. // Given: Number n for i = 1 to 9 print the following: n + " x " + i + " = " + n * i

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to display the multiplication table for a given integer up to 10 using a 'for' loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

2x2 matrix multiplication program in 8085 processor?

how to write a program for matrix multiplication in microprocesspr


How would you write a program that read an integer for display each of digit of integer in English?

Use an enum if you are using a c style language. Or a map data structure. Assign each integer an English value and then match it to what the user inputs.


How can I write a program to display prime numbers from 1 to 100?

Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.


Write a program to subtract integer y from integer x?

x -=y;


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.


Write a program to display the name of days when a user enters a number?

write a program to display your name age class schoolname e-mail 2hobby based on choice


Write a program to display your name on computer screen?

Faisal


Write an Algorithm for multiplication table of an integer?

int firstNumber,secondNumber for(firstNumber = min; firstNumber &lt;= max; firstNumber++); { for(secondNumber = min; secondNumber &lt;=max; secondNumber++); int result firstNumber * secondNumber; }


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Write a program which takes the temperature in farhenheightthe program should display the farhenheight temperature as well as centigrade C equals?

Write a program which takes the temperature in farhenheight.the program should display the farhenheight temperature as well as centigrade. C= (f-32)*5/9


How you write multiplication program without asterisk symbol?

a*b = exp (ln a + ln b)


Write c programs to display 10 line biodata?

A C++ program can be used to write C programs that will display 10 lines of biodata. Many types of C programming can be written with a C++ program.