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

Daughdrill Corporation is developing direct labor standards. The basic direct labor wage rate is $10.95 per hour. Employment taxes are 9% of the basic wage rate
Can someone do dis for me pleaseeee i still have a lot more hw to do:(
Until a train is a safe distance from the station it must travel at 5 m/s. Once the train is on open track it can speed up to 45 m/s. If it takes a train 8 sec
write an equivalent expression for 20p-18​
Find the mean 9,2,5,8,3,3,4
Can you guys answer this in Spanish, thanks.
What is the maximum number of moles of H2O that can be produced from the reaction of 5.6 mol H2 and 4.7 mol O2? H2 + O2 H2O What is the limiting reactant
(transition to college mathematics.) •For mixture problems it's never a good idea to try to make a picture of the problem. -True -False
why were immagrants arriving to american mistreated
Factor completely x3 + 8x2 − 3x − 24. (x − 8) (x2 − 3) (x + 8) (x2 + 3) (x − 8) (x2 + 3) (x + 8) (x2 − 3)