编写程序,帮下忙!!!

来源:百度知道 编辑:UC知道 时间:2024/05/05 16:58:27
(1);
编写一个程序,计算多项式2X三次方-5X平方+6,其中X=2.55;
(2);
编写一个程序,完成将用户输入的任意一个小写字母转换成大写字母。

(1):
#include<stdio.h>
int main()
{
double x=2.55;
printf("%lf\n",2*x*x*x-5*x*x+6);
return 0;
}
(2)
#include <stdio.h>
int main()
{
char c;
printf("输入一个字符:");
c=getchar();
if(c>'Z')
c-=32;
printf("%c\n",c);
return 0;
}