在dev cpp上编写的c程序 请指出错误
这个程序只能运行第一行 输入 数字后 就一闪而过 什么都没有
#include<stdio.h>
int main (void)
{
int age ;
double secs;
printf("please enter your age :____\b\b\b\b");
scanf("%c",&age);
secs = age * 3.156e7;
printf(" your age in years : %d in seconds:%e\n",age ,secs);
getchar();
return 0;
}
[解决办法]
#include<stdio.h>int main (void){ int age ; double secs; printf("please enter your age :____\b\b\b\b"); scanf("%c",&age); secs = age * 3.156e7; printf(" your age in years : %d in seconds:%e\n",age ,secs); getchar(); system("pause"); return 0;}
[解决办法]
#include <stdlib.h>