Professional Documents
Culture Documents
Initialize i as 1 and sum as 0 repeat step 3,4 until i <=10 sum=sum+i increment i by 1 end
Sum of even numbers between 1 and 10 Sum of odd numbers between 1 and 10
Factorial of a number 1. i 2. 3. 4. 5. 6. 7. Initialize fact as 1 repeat step 4,5 until i >=1 fact=fact*i decrement i by 1 print the value of fact end Take the number for which the
Fibonacci Series 1. Initialize the value of a as 0 and b as 1. 2. Take the limit n of the series 3. Print the value of a and b
4.
Initialize value of k as 2.
Reversing the digits of a number 1. Take the value of num from the user 2. Initialize rev_num as 0 3. Repeat until num > 0 4. rev_num = rev_num*10 + num%10; 5. num = num/10 6. Display the value of rev_num
Algorithm to find all the numbers between 1 and 100 that ends with 1.