Lab Activity (1)
1.
Draw
a flowchart and write a program to read three numbers and display the average.
2.
Draw
a flowchart and write a program to add, subtract, divide and multiple two
floating point numbers and make the output in two decimal places. Then the
program will ask another two integer numbers to make modulus operation and
display the result. Sample output as follows:
This program is to test arithmetic
operator in C programming
Enter floating point number 1: 6.6
Enter float point number 2: 3.3
6.6 + 3.3 = 9.9
6.6 – 3.3 = 3.3
6.6 / 3.3 = 2.2
6.6 * 3.3 = 21.78
Enter integer number 1: 50
Enter integer number 2: 3
50 % 3 remainder 2
|
tarikh hantar : akan di maklumkan kemudian
No comments:
Post a Comment