当我构建并运行我的代码时,我得到了这个错误
one exited unexpectedly lost connection
Program ended with exit code; -1
有什么想法吗?
#include <stdio.h>
int main()
{
int hour;
float price, total_price;
char first_letter;
printf("Type first letter of worker name> ");
scanf("%c",&first_letter);
printf("Type work hours> ");
scanf("%d",&hour);
printf("Type price for per hour> ");
scanf("%f",&price);
total_price = hour * price;
printf("%c worker will get money per hour: %f\n",first_letter,total_price);
return 0;
}
最佳答案
我遇到了完全相同的问题。使用 shift+Enter,没有 shift 就是回车。
关于c - Xcode5与C失去连接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20686814/