added new task

This commit is contained in:
ada-dmitry
2023-11-16 12:03:31 +03:00
parent 10b256c812
commit 1bbd6527b8
9 changed files with 95 additions and 4 deletions
+5 -3
View File
@@ -1,16 +1,18 @@
#include <stdio.h>
#include "func.c"
float fahr(int cel);
float celsius(int fahr);
int main()
{
int cel; // градусы Цельсия
float f; // градусы Фаренгейта
int cel; // градусы Цельсия
float f, ans; // градусы Фаренгейта
scanf("%d", &cel);
f = fahr(cel);
printf("%.2f\n", f); // .2f - печатать с точностью до 2 знаков после .
ans = celsius((int)f);
printf("%.2f\n", ans);
return 0;
}