do...while 的循环问题 求助
感觉code 是对的,就是编译时不显示,,求助。。刚刚学C#include <stdio.h>
main()
{
int temp;
float celsius;
char repeat;
do
{
printf("Input a temperature:");
scanf("%d", &temp);
celsius=(5.0/9.0)*(temp-32);
printf("The converted F format is %.2f\n", celsius);
printf("Do you have other data need to be converted?\n");
printf("Press Y or y if you want to continue");
repeat=getchar();
putchar('\n');
}
while (repeat=='Y' || repeat=='y');
}