Question
write a 'c' program for each problems seperately, PROBLEM 1: Declare a variable of type float Assign it the value 3.6 Print it to ten
write a 'c' program for each problems seperately,
PROBLEM 1:
Declare a variable of type float Assign it the value 3.6 Print it to ten decimal places
PROBLEM 2:
Declare a variable of type float Assign it the value 1.0/10.0 (exactly as shown here) Print it to ten decimal places
PROBLEM 3:
Declare a variable of type double Assign it the value 1/2 (exactly as shown here) Print it Assign it the value 1.0/2.0 (exactly as shown here) Print it
PROBLEM 4:
Declare a variable of type double Assign it the value 9999999.4499999999 (exactly as shown here) Print it Cast it to a float Print the float
PROBLEM 5:
Declare a variable of type int Assign it the value 30000*30000 (exactly as shown here) Print it Assign it the value 40000*40000 (exactly as shown here) Print it Assign it the value 50000*50000 (exactly as shown here) Print it Assign it the value 60000*60000 (exactly as shown here) Print it
PROBLEM 6:
Use floats for this problem Assign the value 1e20 to a float and print it Assign the value (1e20 + 3500000000) to a float and print it Assign the value (1e20 + (3500000000 * 1000000000)) to a float and print it Declare a variable of type float Assign it the value of 1e20 Use a loop to add 3500000000 to that variable 1000000000 times. Print the result after the loop Note: Don't just multiply then add for that last part above. Use a loop to add 3500000000 at each iteration
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started