3.10 Identify and correct the errors in each of the following. [Note: There may be more than one

a) if ( age >= 65 );
puts( "Age is greater than or equal to 65" );
puts( "Age is less than 65" );
b) int x = 1, total;
while ( x <= 10 ) {
total += x;
c) While ( x <= 100 )
total += x;
d) while ( y > 0 ) {
printf( "%dn", y );

2. (Sales Commission Calculator) One large chemical company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9% of $5000, or a total of $650. Develop a program that will input each salespersons gross sales for last week and will calculate and display that salespersons earnings. Process one salesperson's figures at a time. Here is a sample input/output dialog:

Enter sales in dollars (-1 to end): 5000.00
Salary is: $650.00
Enter sales in dollars (-1 to end): 1234.56
Salary is: $311.11
Enter sales in dollars (-1 to end): -1

3. (Diameter, Circumference and Area of a Cirle) Write a program that reads the radius of a circle (as a float value) and computes and prints the diameter, the circumference and the area. Use the value 3.14159 for p.

4. Factorial) The factorial of a nonnegative integer n is written n! (pronounced n factorial) and is defined as follows: n! = n (n - 1) (n - 2) 1 (for values of n greater than or equal to 1) and n! = 1 (for n = 0). For example, 5! = 5 4 3 2 1, which is 120.

a) Write a program that reads a nonnegative integer and computes and prints its factorial.

5. (Calculating the Sum of Even Integers) Write a program that calculates and prints the sum of the even integers from 2 to 30.

6. (Triangle-Printing Program) Write a program that prints the following patterns separately, one below the other. Use for loops to generate the patterns. All asterisks (*) should be printed by a single printf statement of the form printf( "%s", "*" ); (this causes the asterisks to print side by side). [Hint: The last two patterns require that each line begin with an appropriate number of blanks.]

7. (Even or Odd) Write a program that inputs a series of integers and passes them one at a time to function even, which uses the remainder operator to determine whether an integer is even. The function should take an integer argument and return 1 if the integer is even and 0 otherwise.

8. (Temperature Conversions) Implement the following integer functions: a) Function celsius returns the Celsius equivalent of a Fahrenheit temperature.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.