Answer the question
In order to leave comments, you need to log in
Why is the while loop not running in my code?
#include "stdio.h"
#include "windows.h"
int main(void)
{
SetConsoleOutputCP(CP_UTF8);
float num, num_0, result;
int status;
printf("Введите два числа с плавающей точкой через пробел:");
status = scanf("%f %f", &num, &num_0);
while (status == 1)
{
result = (num - num_0) / num * num_0;
printf("Результат равен %.2f\n", result);
printf("Введите два числа с плавающей точкой через пробел(q - чтобы завершить программу):");
status = scanf("%f%f", &num, &num_0);
}
printf("Программа завершена!");
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question