各位看看这程序出了什么问题。
#include<stdio.h> void plus(float);
void minus(float);
int main(void)
{
float p=0,a;
int e;
char c;
printf("please input minuend p:\40");
scanf("\40%f", &p);
printf("please input'+'||'-': ");
scanf("%c", &c);
e = c;
if(43==e)
plus(p);
if(45==e)
minus(p);
return 0;
}
void plus(float p )
{
float e,a;
printf("please input minuend e:\40");
scanf("\40%f", &e);
printf("\40\40\40\40%-.1f\n", p);
printf("\40\40+\40%-.1f\n", e);
printf(".........\n");
printf("\40\40\40%-.1f\n", a=(p+e));
printf("please go on\n");
}
void minus(float p)
{
float e,a;
printf("please input minuend e:\40");
scanf("\40%f", &e);
printf("\40\40\40\40%-.1f\n", p);
printf("\40\40-\40%-.1f\n", e);
printf(".........\n");
printf("\40\40\40%-.1f\n", a=(p-e));
printf("please go on\n");
}