LOOPING PROGRAMS
We will show you some tricky programs including looping
These programs are little difficult from previous programs posted in starting
This flow chart show how program flow in for loop.
PROGRAM No 1
This program gives a factorial of any number the program is as follow Firstly we suppose a number n,j and fact.This is your choice what you suppose a number it may be x,y and z .
then we type a condition for input a number it is the number which we want to find a factorial
then we type a for loop with condition
then we type a condition for input a number it is the number which we want to find a factorial
then we type a for loop with condition
OUTPUT
PROGRAM No 2
This is a program on which we print our name two time. we write for loop with condition the control flow is as follow
PROGRAM No 3
PROGRAM No 4
CHANGING TEMPERATURE FROM ONE TO ANOTHER
This program follow the same condition
This program follow the same condition
Comments
Post a Comment