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 plz. Plz be right :)
A car transporter can carry 12 cars , how many transporters are needed for 67 cars
What role did antioch play in the life of paul and the early church?
in the what cycle,liquid evaporates from oceans,plants,and other living things and forms water vapor,a gas, which rises in the atmosphere then cools and turns b
Solve for x: one over eight(8x + 15) = 24
describe 2 ways to show 2 fractions are equivalent
why are milkshakes better than banana splits i need a essay i will give 99 points plus a thanks and 5 stars
What happens to proteins within the endoplasmic reticulum? A. They are synthesized. B. They are broken down. C. They are converted into lipids. D. They are
There are 18 cub scouts in troop 645. The number of scouts is 3 more than five times the number of adults leaders. Find the number of aldilt leaders.
A homogenous mixture _____. is made of ions and free electrons has an even distribution of parts throughout the whole mixture is more easily separated than a he