Friday, March 4, 2011

Exercice 2..


Exercise 2 :
Bahasa melayu=
Bahasa inggeris=
Matematik=
Sains=
Total=
Average=

Formula :
total=bm+bi+math+sains
average=total/4


OK niy step na wt jawapan :
1) Go to my computer
     

2) Choose Local Disk (C:)

3) Click folder TC > folder BIN
    

4) Click TC application

5) If your windows can't support this system for full screen, just ignore MS-DOS Subsystem table
    (terime jela screen yg comel loteh kecik na mampos tuhh)

6) After open the Turbot C++ , click file > new > type your group coding

7) Answer for exercise 2

8) Don't forget to save the coding

9) To compile, go to compile menu and click compile

10) Press any key

11) If you make any mistake, syntax error will appear

12) To run, go to run menu and click run

 

#include<iostream.h>//header
main()//start body
{//open curly bracket
float bm;
float bi;
float math;
float sains;
float total;
float average;
//input 1
cout<<"bahasa melayu=";
cin>>bm;
//input 2
cout<<"bahasa inggeris=";
cin>>bi;
//input 3
cout<<"matematik=";
cin>>math;
//input 4
cout<<"sains=";
cin>>sains;
//formula
total=bm+bi+math+sains;
//output
cout<<"total="<<total;
//formula
average=total/4;
//output
cout<<"average="<<average;
return 0;
}//close curly bracket
//end body

No comments:

Post a Comment

jangan baca jer...comint arrr...