2013年1月7日
摘要: 2013年1月6日星期日第五讲(运算符续 Operator cont.)第6讲.流程控制语句.Flow.Control.Statement1.当有若干个变量参与运算时,最终结果取决于什么?2.举例说明逻辑运算符的短路特性。3.举例说明自增自减运算符的作用。4.编程计算: int i = 0; int j = i++ + ++i; int k = --i + i--; 计算j和k的值。1. 取决于运算符的优先级和结合方向。2. 逻辑运算符有 ! (非), ||(或),&&(与),^ (异或); 非 就相当于电路中... 阅读全文
posted @ 2013-01-07 22:10 邵邵 阅读(178) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"void main(){ int m,n; printf("input m and n:\n"); scanf("%d%d",&m,&n); printf("转换前:"); printf("m=%d n=%d\n",m,n); n=m-n; m=m-n; n=m+n; printf("转换后:"); printf("m=%d n=%d\n",m,n);} 阅读全文
posted @ 2013-01-07 17:16 邵邵 阅读(204) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"#include "stdlib.h"struct shao{ int num; struct shao *next;};void main(){ int n; struct shao *head=NULL,*p1,*p2; printf("请输入要参加几个数:"); scanf("%d",&n); while(n<=0) { printf("错误!请重新输入:"); scanf("%d",&n); } p1=(str 阅读全文
posted @ 2013-01-07 17:13 邵邵 阅读(632) 评论(0) 推荐(0) 编辑
摘要: 求长方形的面积:public class Shao{ public static void main(String[] args) { Shao a=new Shao();a.Shao(1,2); System.out.println(a.getShao()); } int chang; int kuan; public void Shao() { chang=1; kuan=1; } public void Shao(int newChang,int newKuan) { chang=newChang; kuan=n... 阅读全文
posted @ 2013-01-07 14:35 邵邵 阅读(182) 评论(0) 推荐(0) 编辑

淘宝美工兼职招聘