Input : Any natural number V1 Logic : I used for loop and summ variable V2 Logic : I used formula for sum of n natural numbers Output : Sum of natural numbers
Input :Three numbers Output :Biggest and smallest number among three numbers Logic :First compare any two numbers to see which is smaller and bigger between the two numbers, And compare it with the third number to find out which is the smallest and biggest number.
Comments
Post a Comment