korg nak kelas hubungan etnik bila?
FOP stands for....
~~Its Good for You,You Know That~~
Sunday, September 28, 2014
Saturday, September 20, 2014
Notes for Hubungan Etnik
Well y'all aq da upload note slide hubungan etnik kat sini n silalah dwld....for those who take fundamental of progamming or may take it in the future, blog ni wat rujukan korg
Notes
Note Hubungan Etnik (Click here to download)
Notes
Note Hubungan Etnik (Click here to download)
Monday, March 28, 2011
Exercise 1
#include<iostream.h>
main()
{
//declare variable
float num1,num2,num3,calculate;
//input1
cout<<"please insert number for num1 =";
cin>>num1;
//input2
cout<<"please insert number for num2 =";
cin>>num2;
//input3
cout<<"please insert number for num3 =";
cin>>num3;
//formula
calculate =(num1*num2)-num3+(num2/num1);
//output
cout<<"the answer for the problem is ="<<calculate;
return 0;
}
Exercise 2
#include <iostream.h>
main()
{
//declare
float cgpa,total,total2;
char a;
//input
cout<<"Please enter your CGPA:"<<endl;
cin>>cgpa;
if (cgpa == 4.00)
{total = (1)*16000;
total2 = 16000 - total;}
else if (3.00<=cgpa<=3.99)
{total = (0.8)*16000;
total2 = 16000 - total;}
else if (2.00<=cgpa<=2.99)
{total = (0.4)*16000;
total2 = 16000 - total;}
else if (0<=cgpa<=1.99)
{total = (0)*16000;
total2 = 16000 - total;}
else {cout<<"Invalid CGPA";}
//output
cout<<"Your CGPA is "<<cgpa<<endl;
cout<<"Your Discount "<<total<<endl;
cout<<"You have to pay "<<total2;
cout<<"\n\nType quit to exit application"<<endl;
cin>>a;
return 0;
}
Integer
#include<iostream.h>
main()
{
//declare variable
int multiply,num1,num2;
//input1
cout<<"Enter num1:";
cin>>num1;
//input2
cout<<"Enter num2:";
cin>>num2;
//formula
multiply=num1*num2;
//output
cout<<"Answer is:"<<multiply;
return 0;
}
Homework 2
#include <iostream.h>
main ()
{
//variable
float sub1,sub2,sub3,sub4,sub5,cpa;
//input1
cout<<"insert subject1:";
cin>>sub1;
//input2
cout<<"insert subject2:";
cin>>sub2;
//input3
cout<<"insert subject3:";
cin>>sub3;
//input4
cout<<"insert subject4:";
cin>>sub4;
//input5
cout<<"insert subject5:";
cin>>sub5;
//process
cpa=((sub1*3)+(sub2*3)+(sub3*2)+(sub4*2)+(sub5*4))/5;
//output
cout<<"subject 1:"<<sub1<<endl;
cout<<"subject 2:"<<sub2<<endl;
cout<<"subject 3:"<<sub3<<endl;
cout<<"subject 4:"<<sub4<<endl;
cout<<"subject 5:"<<sub5<<endl;
cout<<"CPA is:"<<cpa<<endl;
return 0;
}
Homework 1
#include<iostream.h>
main()
{
//variable
float as1,as2,as3,as4,as5,mid,final,total;
//input1
cout<<"assignment 1:";
cin>>as1;
//input2
cout<<"assignment 2:";
cin>>as2;
//input3
cout<<"assignment 3:";
cin>>as3;
//input4
cout<<"assignment 4:";
cin>>as4;
//input5
cout<<"assignment 5:";
cin>>as5;
//input6
cout<<"midterm:";
cin>>mid;
//input7
cout<<"final:";
cin>>final;
//formula
total = as1+as2+as3+as4+as5+mid+final;
//output
cout<<"assignment 1 is:"<<as1<<endl;
cout<<"assignment 2 is:"<<as2<<endl;
cout<<"assignment 3 is:"<<as3<<endl;
cout<<"assignment 4 is:"<<as4<<endl;
cout<<"assignment 5 is:"<<as5<<endl;
cout<<"mid score is:"<<mid<<endl;
cout<<"final score is:"<<final<<endl;
cout<<"total is:"<<total;
return 0;
}
Subscribe to:
Posts (Atom)