seanrapha246 seanrapha246
  • 21-11-2021
  • Computers and Technology
contestada

Write a C program to declare two integers and one float variables then initialize them to 10, 15, and 12.6. It then prints these values on the screen

Respuesta :

felipegomes220
felipegomes220 felipegomes220
  • 21-11-2021

Answer:

pretty simple, notice, I used '1f' so the float would print only 1 significant number after. Sure you can modify it to make it more readable and not just numbers on the screen, it's up to you

Explanation:

#include <stdio.h>

int main()

{

   int n1 = 10;

   int n2 = 15;

   float f1 = 12.6;

   

   printf("%d %d %.1f", n1, n2, f1);

   

   return 0;

}

Answer Link

Otras preguntas

Help me I don't know what it is.
A 11,000-kg train car moving due east at 21.0 m/s collides with and couples to a 23,000-kg train car that is initially at rest. What is the common velocty of th
Need help on questions 3 and 4
use what you've learned to match the earths inner layers to their correct descriptions
The coordinates of the midpoint of GH¯¯¯¯¯¯¯¯are M(−132,−6) and the coordinates of one endpoint are G(−4, 1).
Find the area of the shaded region​
what was mercantilism
Help meeeeeeeeeeeeeeeeeeeeeeeeeee
What type of legislature does the US have?* Bilateral Diametrical Bicameral Unicameral
Jacob is self-employed and reports all of his income and expenses in his personal income tax return. ______________