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
Example: Find the LCM of 12 and 30.Write the multiples of 12: 12, 24, 36, 48, 60, 72, ...Write the multiples of 30: 30, 60, 90, ...The first number you find which is in both lists is the LCM: 60.
Even multiples of 5 must end with a zero.
8 and 9 are corpime, so their first common multiple is their product. The next common multiples are simply the multiples of that first multiple.The first three common multiples are therefore 72, 144 and 216.
Formulas for compounds
There is no largest number. You can just keep going.
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 a program to print A to Z on screen in c?
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
echo 'print a pattern'
Example: start ask the name for each word . print first letter stop
Write the first 6 Multiples of 12 and 14.
write a program to print the series 1/12+1/22+.........+1/n2 ?
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.
class multiple3 { public static void main(String args[]) { int i=300; while(i>=100) { i = 1-3; i--; System.out.println(i); } } }
This is a directive, not a question.
good morning
Yes.