#include
main( ) //start body
{ //open curly bracket
//declare variable
float area;
float radius;
//input 1
cout<<"Enter radius=";
cin>>radius;
//fomula
area=3.14*radius*radius;
//output
cout<<"area="< return 0;
}//close curly bracket
//end body
Nk wat coding nih kene ikot rules macam kt bawah nih:
1) Mule2 kene ikot formula macam yg die bagi, area utk circle area= 3.14*radius*radius
2) Carik brape variable name yg ade pastu declarekan
3) Pastu wat flowchart ikot soklan
cth:start>read radius>area=3.14*radius*radius>print output >end
4) Pastu wat la coding macam kt atas uh..
No comments:
Post a Comment