Write a single pseudocode statement that indicates each of the following:
a) Display the message "Enter two numbers".
b) Assign the sum of variables x, y, and z to variable p.
c) The following condition is to be tested in an if…else selection statement: The current
value of variable m is greater than twice the current value of variable v.
d) Obtain values for variables s, r, and t from the keyboard.
ANSWER:
a) Display the message "Enter two numbers".
b) Assign the sum of variables x, y, and z to variable p.
c) The following condition is to be tested in an if…else selection statement: The current
value of variable m is greater than twice the current value of variable v.
d) Obtain values for variables s, r, and t from the keyboard.
ANSWER:
a) printf(“Enter
two numbers”);
b) p
= x+y+z;
c) if(m>2v)
d) printf(“Masukan
nilai s:”);
scanf(“%d”,
&s);
printf(“Masukan
nilai r:”);
scanf(“%d”,
&r);
printf(“Masukan
nilai t:”);
scanf(“%d”,
&t);
0 komentar:
Posting Komentar