answersLogoWhite

0

Algorithm: multiples

input: two positive integers, m and n

output: print first n multiples of m

i = m;

for j = 1 to n

print i

i = i + m;

next j

User Avatar

Wiki User

8y ago

What else can I help you with?

Related Questions

Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


Write a qbasic program to accept a no and print it multiple table?

Cls print the multiples tables of 1 to 5 for x=1 to 5 for y=1 to 10 print x;"*";y;"=";x*y next y print print next x end


Write a unix program to print print a pattern?

echo 'print a pattern'


How do you write the pseudo code for a program that print initials?

Example: start ask the name for each word . print first letter stop


manthan?

Write the first 6 Multiples of 12 and 14.


Write a C program to print the following series 112 122 . 1n2?

write a program to print the series 1/12+1/22+.........+1/n2 ?


Write a java program using forloop to generate the first 10 multiples of the first 10 natural numbers?

Here's a simple Java program that uses a for loop to generate the first 10 multiples of the first 10 natural numbers: public class Multiples { public static void main(String[] args) { for (int i = 1; i <= 10; i++) { System.out.print("Multiples of " + i + ": "); for (int j = 1; j <= 10; j++) { System.out.print(i * j + " "); } System.out.println(); } } } This program iterates through the first 10 natural numbers and prints their multiples from 1 to 10.


Write a java program to print multiples of 3 from 300 to 100?

class multiple3 { public static void main(String args[]) { int i=300; while(i>=100) { i = 1-3; i--; System.out.println(i); } } }


Write a program to print the sum of a sparse matrix?

This is a directive, not a question.


Write a c program to print roman letters?

good morning


Can you Write a program in 'c' to print symbols of playing cards?

Yes.