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

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

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 . . .

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online