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 with my math HW!!! pleases will give brainliest! pls do 24-30
what is a ground for racism
Please explain this and give answers
Where does grandma live in A Long Way from Chicago and why?
Guy’s pleaseeee help
what will you make a video on for social studies​
nadia typically types 32 words per minute, but her rate may vary by as much as 5 words per minute. let x be the actual rate at which nadia types. what is the ra
Use the Distributive Property to expand the expression y(9 -0.2x).
What cross-section do you get when you give a horizontal cut to a die? The Chapter is Visualising solid shapes.
List ten structure you coul find in an electron micro graphy of an animal cell would be absent from the cell of bacteria