Question: Write a program that can add first n positive odd numbers starting from 1 and the number n is entered by the user. The program

Write a program that can add first n positive odd numbers starting from 1 and the number n is entered by the user. The program should only work for positive input data and give zero output for negative data
For example:
Input is 3,Result is 9
Answer:(penalty regime: 0,0,10,20,...%)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!