Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi exercise 3,4,5 pleaseeee? Exercise #3: a. Using Geany, write the following C program as is: include catdi. Dobleted e -b): printe (The value of

image text in transcribed
Hi exercise 3,4,5 pleaseeee?
image text in transcribed
Exercise #3: a. Using Geany, write the following C program as is: include catdi. Dobleted e -b): printe (The value of dis din, d) return (0) b. Compile the program. C. This program contains syntax errors. On a piece of paper, indicate each one of them and make the appropriate corrections. d. Write your answers in a text file. e. Try to correct the errors. Compile and build the program with all the corrections made. f. Once the syntax errors have been corrected, there are two errors that remains when you try to run it (one is called a runtime error because you are trying to do something illegal, the other is a logic error because you made a small mistake in the program). What are they? Tell your TA or ask for hints! g. Correct the errors and compile and run the program again. What value of d is displayed? Exercise #4: a. Write and run in Geany a C program that does this: Ask the user for a real number (like 316501.6735) and display the rounded number to the nearest hundredth (ex: 316500), and the nearest thousandth (ex: 316000). Can you do it with what you know at this moment? Can you display the rounded number to one decimal place? (ex: 316501.7). That one should be easy. Exercise #5: a. Find the formula of the ellipse on the internet and write and run another C program that asks the user for both the long and short radiuses and then calculates and displays the circumference of the ellipse. You should be able to do that one without difficulty. #include inx main (void) int a = 3; b = 4, e; Double f = 4, c, d; d = a + b; c = a 1 (f - b); printf (The value of d is %d" , d) return (0)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions