用C语言编写的一些源码示例

源代码在线查看: cpp1.c

软件大小: 2857 K
上传用户: xiaomaolv1017
关键词: C语言 编写 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				#include 
				void main()
				{
					int iResult,a=10,b=8,c=6,d=5,e=2;
				
					iResult=a-b-c-d;
					printf("iResult=a-b-c-d\t%d\n",iResult);
				
					iResult=a-b+c-d;
					printf("iResult=a-b+c-d\t%d\n",iResult);
					
					iResult=a+b/c/d;
					printf("iResult=a+b/c/d\t%d\n",iResult);
				
					iResult=a+b/c*d;
					printf("iResult=a+b/c*d\t%d\n",iResult);
				
					iResult=a/b*c*d;
					printf("iResult=a/b*c*d\t%d\n",iResult);
				
					iResult=a%b/c*d;
					printf("iResult=a%%b/c*d\t%d\n",iResult);
				
					iResult=a%b%c%d;
					printf("iResult=a%%b%%c%%d\t%d\n",iResult);
				
					iResult=a-(b-c)-d;
					printf("iResult=a-(b-c)-d\t%d\n",iResult);
				
					iResult=(a-(b-c))-d;
					printf("iResult=(a-(b-c))-d\t%d\n",iResult);
					
					iResult=a-((b-c)-d);
					printf("iResult=a-((b-c)-d)\t%d\n",iResult);
				
					iResult=a%(b%c)*d*e;
					printf("iResult=a%%(b%%c)*d*e\t%d\n",iResult);
				
					iResult=a+(b-c)*d-e;
					printf("iResult=a+(b-c)*d-e\t%d\n",iResult);
				
					iResult=(a+b)*c+d*e;
					printf("iResult=(a+b)*c+d*e\t%d\n",iResult);
				
					iResult=(a+b)*(c/d)%e;
					printf("iResult=(a+b)*(c/d)%%e\t%d\n",iResult);
				}
							

相关资源