关于条件语句
#include<stdio.h>
void main()
{
int a,b,c;
printf("please input a and b: ");
scanf("%d%d",a,b);
c=a-b;
if(c==a||c==b)
printf("difference is equal to value<number of value entered>\n");
else
printf("difference is not equal to any of the values entered\n");
}
程序要求:计算两个数的差值。如果差值等于输入的两个值中的任意一个,
输出:difference is equal to value<number of value entered>如果差值
不等于输入的两个值中的任意一个,
输出:difference is not equal to any of the values entered
我不知问题出在哪,请大家指教!
void main()
{
int a,b,c;
printf("please input a and b: ");
scanf("%d%d",a,b);
c=a-b;
if(c==a||c==b)
printf("difference is equal to value<number of value entered>\n");
else
printf("difference is not equal to any of the values entered\n");
}
程序要求:计算两个数的差值。如果差值等于输入的两个值中的任意一个,
输出:difference is equal to value<number of value entered>如果差值
不等于输入的两个值中的任意一个,
输出:difference is not equal to any of the values entered
我不知问题出在哪,请大家指教!
...全文
相关推荐
Python入门学习之条件语句练习题
在这个"Python入门学习之条件语句练习题"中,我们将深入理解条件语句的用法,以及如何结合逻辑运算符来实现更复杂的判断。
【Python】【条件语句】精讲Python条件语句
在Python中,我们使用if、elif和else关键字来构建条件语句。通过判断条件的真假,程序将根据不同的情况执行相应的代码块。条件语句的灵活性使得我们能够处理各种情况。我们可以使用比较运算符
7 makefile文件的条件语句.doc
下面是 Makefile 文件中的条件语句的知识点总结:条件语句的基本结构条件语句的基本结构由三个部分组成:ifeq、else 和 endif。ifeq 指令是条件语句的开始,并指明条件。
Python 条件语句
Python的条件语句很有用啊 可以看看我写的
jquery if条件语句的写法
在JavaScript和jQuery中,`if`条件语句是编程中不可或缺的部分,用于根据特定条件执行不同的代码块。这里我们将深入探讨jQuery中`if`条件语句的使用,并提供一些示例来帮助理解。


