编程题,请求帮助!

来源:百度知道 编辑:UC知道 时间:2024/07/08 02:00:28
1.从键盘输入一个英文小写字母,输入相应的大写字母.
2.对输入的两个整数按大小顺序输出.
3.写出下面各逻辑表达式的值.设a=3,b=4,c=5
(1)a/b*c ______
(2)a||+c&&b-c ______
(3)a+b<c&&b==c ______
`
这是《C程序设计》里的试题。

第一题
#include <stdio.h>
void main()
{
char a;
printf("Please enter a lowercase letters\n");
scanf("%c",&a);
printf("%c\n",a-32);
}
第二题
#include "stdio.h"
void main()
{
int a,b;
printf("Please enter the two figures:\n");
scanf("%d%d",&a,&b);
printf("Sort results after");s
printf("%d\n",a>b?a:b);
printf("%d\n",a>b?b:a);
}
第三题
3.写出下面各逻辑表达式的值.设a=3,b=4,c=5
(1)a/b*c 判断结果:0
(2)a||+c&&b-c 判断结果:1
(3)a+b<c&&b==c 判断结果:0