140k views
4 votes
Write a C program that stores the number 123.45 in the variable alpha, 98.76 in the variable beta, and 76.67 in the variable gamma.

2 Answers

11 votes

CODE

#include <stdio.h>

int main() {

float alpha = 123.45;

float beta = 98.76;

float gamma = 76.67;

printf("alpha = %.2f\\beta = %.2f\\gamma = %.2f", alpha, beta, gamma);

return 0;

}

DISPLAY

alpha = 123.45

beta = 98.76

gamma = 76.67

EXPLANATION

Declare the variables alpha, beta, and gamma as float types.

Print the values with 2 decimal points.

Return an integer value.

User Hinek
by
5.3k points
8 votes

Answer:

C

Step-by-step explanation:

the answer

User Henry Brown
by
5.1k points