Guest_imported
New member
- Jan 1, 1970
- 0
Hello i am a new user to the c language also programming i have come across a problem whilst compiling my programme it is coming up with syntax error '}' ??? i dont know why either this is my source code
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
void main()
{
char deg,
float temp,
kelvin;
deg = toupper(getch());
do
{
printf("\nPlease enter the Degrees you want to use > "
;
scanf("%c",°);
switch (deg)
{
case 'C': printf("\nPlease enter the tempeture to convert to kelvin > "
;
scanf("%f",&temp);
kelvin = temp + 273;
while (kelvin <= 0);
{
printf("Invalid"
;
}
printf("the results is %f",kelvin);
}
}
}
i thank you in advance.
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
void main()
{
char deg,
float temp,
kelvin;
deg = toupper(getch());
do
{
printf("\nPlease enter the Degrees you want to use > "
scanf("%c",°);
switch (deg)
{
case 'C': printf("\nPlease enter the tempeture to convert to kelvin > "
scanf("%f",&temp);
kelvin = temp + 273;
while (kelvin <= 0);
{
printf("Invalid"
}
printf("the results is %f",kelvin);
}
}
}
i thank you in advance.