To print the first 10 multiples of 5, you can create a simple algorithm using a loop. Start by initializing a variable to store the current multiple as 1. Then, use a loop that iterates 10 times, multiplying 5 by the current multiple and printing the result. Finally, increment the current multiple by 1 in each iteration of the loop to move on to the next multiple. This algorithm will output the first 10 multiples of 5: 5, 10, 15, 20, 25, 30, 35, 40, 45, and 50.
Sum = 0 For N = 1 to 10 Sum = Sum + 2*N Next N Print Sum
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
For N = 1 to 10 Print 2 * N Next N
#include<stdio.h> int main () { printf ("2 4 6 8 10 12 14 16 18 20"); return 0; }
enter the number whose digits are to be added num is the given value num=0! k=num%10 sum=sum=k k=num/10 num=k print the sum of the digits
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
let x = 3 for count = 1 to 20 print x let x = x + 3 next count
2+4
int firstNumber,secondNumber for(firstNumber = min; firstNumber <= max; firstNumber++); { for(secondNumber = min; secondNumber <=max; secondNumber++); int result firstNumber * secondNumber; }
Start print "the sum of all even numbers is infinite" end
Sum = 0 For N = 1 to 10 Sum = Sum + 2*N Next N Print Sum
3
read num1 read num2 sum = num1 num2 print highest value
By using Depth First Search or Breadth First search Tree traversal algorithm we can print data in Binary search tree.
start read pie area circum print area print circum stop
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