a)initializing variable Pi with the value 3.14 (constant)
//declare
float Pi-3.14
b)declare a variable named parameter with double data type (declare variable)
//declare parameter
double parameter=5.776198
c)give instruction that alowed user to input data (input)
//input
cout<<"Enter data=";
cin>>data;
d)input number of computer using variable(input assign to variable value)
//declare nc=number of computer
intnc;
//input
cout<<"Enter number of computer=";
cin>>nc;
2. solve the question below.show the working
a) 5*2 %3 + 25 / 5
=[10%3]+25/5
=1+5
=6
b)a=5,b=6
!((a<3)&&(a==3)||(b>9))
=




No comments:
Post a Comment