1 Write a pseudocode to compute the sum off odd numbers betw

1) Write a pseudocode to compute the sum off odd numbers between 2 to 30 ??

2) Write a pseudocode for a programming logic that will prompt the user to enter his age in years.The progran should convert the users age in to years and days and display the following mesaage as output

Please do it fast

Solution

1.

Algorithm: SumOfOdds()

sum := 0; //Initialize sum to 0.

num := 2; //Initialize num to 2.

while num <= 30 //Till num is less than or equal to 30.

sum := sum + num; //Add the num to sum.

num += 2; //Add 2 to num.

return sum; //Return the final sum.

2. Hey. You are not clear with your requirements here. You are asking something like following message as outpu, but there is nothing to follow. So, please be clear with your requirement.

1) Write a pseudocode to compute the sum off odd numbers between 2 to 30 ?? 2) Write a pseudocode for a programming logic that will prompt the user to enter his

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site