i got a problem here. do you have another temperature?
i cant type yes or not here and the program directly show me " pls enter to exit "
i,m using quincy 2005
#include %26lt;stdio.h%26gt;
int main (void)
{
int temp;
float celsius;
char repeat;
do
{
printf("Input a temperature:");
scanf("%d", %26amp;temp);
celsius=(5.0/9.0)*(temp-32);
printf("%d degrees F is %6.2f degrees celsius\n",temp, celsius);
printf("do you have another temperature?");
repeat=getchar();
putchar('\n');
}
while(repeat=='Y'|| repeat=='y');
}
C programming?
c:%26gt;
c:%26gt;dos
C:%26gt;dos run
clear weed
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment