Lab3 - Tao Lin Lab#3 Question#3#include int...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Tao Lin Lab#3 Question #3 #include <stdio.h> int main( void ) { int a=5,b=3; //assign a with 5, and b with 3 a=b++; //assign a with b, and then increase b by 1 printf( "a=%d,b=%d\n" , a,b); b=++a*b; //increase a by 1, and then assign b with product of a and b printf( "a=%d,b=%d\n" , a,b); a=a--*3; //assign a with a times 3, and then decrease a by 1 printf( "a=%d,b=%d\n" , a,b); a=--a*b++; //decrease a by 1, and then assign a with product of a and b, and then increase b by 1 printf( "a=%d,b=%d\n" , a,b); return 0; } RESULT: a=3,b=4 a=4,b=16 a=11,b=16 a=160,b=17 Press any key to continue . . .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Tao Lin Lab#3 Question #4 //--------------------------------------------------------------------------- ------------------------------------- // A program that prompt the student to enter his/her individual grade one by one, and then compute and print out //the students's final grade // //grade=(earned lab grade)/(max lab grade)*20 + (earned quizze grade)/(max quizze grade)*20 // + (earned project grade)/(max project grade)*20 + (earned miterm
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/04/2011 for the course EE 140 taught by Professor Lanxiang during the Spring '11 term at Montgomery College.

Page1 / 3

Lab3 - Tao Lin Lab#3 Question#3#include int...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online