[C Program] 3. Float Count-off by CodeChum Admin Counting off a list of float numbers is hard when you speak it, but not when you code it! Don't believe me? Then let's try coding just that!   Instructions: An array containing 30 predefined float values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first. Each outputted value must also only show up to two decimal places. Output Multiple lines containing a float number. 2.41 143.00 3.14 3.12 0.00 -321.12 -414.12 12312.10 4.10 2.42 . . .   ------------------------------------ #include int main(void) {          float nums[30] = {         1.4, 1.2054, 2.2, 2.5, 3.66,          3.0, 4.024, 4.00001, 5.5, 5.10,         1, 2, 3, 4, 5,         -1.11, -1.111, -1.1111, -1.11111, -1.111111,         2.421, 4.1, 12312.1, -414.123, -321.12,         0, 3.123, 3.14, 143, 2.412     };          return 0; }   [C Program] [C Program] [C Program] C.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 40SA
icon
Related questions
Question
100%

[C Program]

3. Float Count-off

by CodeChum Admin

Counting off a list of float numbers is hard when you speak it, but not when you code it! Don't believe me? Then let's try coding just that!

 

Instructions:

  1. An array containing 30 predefined float values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first.
  2. Each outputted value must also only show up to two decimal places.

Output

Multiple lines containing a float number.

2.41
143.00
3.14
3.12
0.00
-321.12
-414.12
12312.10
4.10
2.42
.
.
.
 
------------------------------------
#include<stdio.h>
int main(void)
{
    
    float nums[30] = {
        1.4, 1.2054, 2.2, 2.5, 3.66, 
        3.0, 4.024, 4.00001, 5.5, 5.10,
        1, 2, 3, 4, 5,
        -1.11, -1.111, -1.1111, -1.11111, -1.111111,
        2.421, 4.1, 12312.1, -414.123, -321.12,
        0, 3.123, 3.14, 143, 2.412
    };
    
    return 0;
}
 

[C Program]

[C Program]

[C Program]

C.

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr