Computer - Programming - Module 2 - Dacles
Computer - Programming - Module 2 - Dacles
Programming
Quarter III – Module 2:
Apply different control statements in a program: If . . . Else
Jesber Nabore
(Subject Teacher)
PRE-ASSESSMENT
I. TRUE OR FALSE
1. IF
2. IF
3. ELSE
4. IF
5. IF
6. IF
7. ELSE
8. IF
9. ELSE
10. ELSE
PYTHON
JAVA
JAVASCRIPT
C PROGRAM
ENGAGE
APPLY
#include <stdio.h>
int main(void){
int num;
printf("Enter your mark ");
scanf("%d",&num);
printf(" You entered %d", num); // printing outputs
if(num >=95-100){
printf(" You got A grade"); // printing outputs
}
else if ( num >=85-90){ // Note the space between else & if
printf(" You got B grade");
}
else if ( num >=80-85){
printf(" You got C grade");
}
else if ( num < 70-75){
printf(" You Failed ");
}
return 0;
}
ASSESS
I. TRUE OR FALSE
1. IF
2. ELSE
3. ELSE
4. IF
5. IF
6. IF
7. ELSE
8. IF
9. ELSE
10. ELSE
PYTHON
JAVA
JAVASCRIPT
C PROGRAM
REFLECT
Today, I discovered that the different control statements (if and else) is important in a
program.
I encountered difficulties in using if and else statements in designing a program or in
coding.