0% found this document useful (0 votes)
23 views

Condition Statements

The document discusses a student's hands-on activity using condition statements in C programming. It includes the programming codes to check grade ranges using if/else if/else statements and determine transmuted grades using a switch statement, as well as the output of running the code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Condition Statements

The document discusses a student's hands-on activity using condition statements in C programming. It includes the programming codes to check grade ranges using if/else if/else statements and determine transmuted grades using a switch statement, as well as the output of running the code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DELA CRUZ, RIA DIVINE T.

2021-10772
EIT 0329.1-1 (COMPUTER FUNDAMENTALS AND PROGRAMMING)

Hands-On Activity 4: Condition Statements

• PROGRAMMING CODES (Print Screen)


• OUTPUT (PRINT SCREEN)

• PROGRAMMING CODES
#include <stdio.h>

int main() {

//if, else if, else

float grade = 88.5;

printf("GRADES REMARK:\n");

if (grade > 74)

printf("75 - 100 --> PASSED\n\n");

else if (0 <= grade)

printf("Below 75 --> PASSED\n\n");

else

printf("Others(Less than 0, Greater than 100) --> INVALID GRADE\n\n");

//switch

int transmutted = 3;

printf ("TRANSMUTTED GRADES:\n");

switch (transmutted) {
case 1:

printf("98-100 --> 1.00");

break;

case 2:

printf("95-97--> 1.25");

break;

case 3:

printf("92-94 --> 1.50");

break;

case 4:

printf("89-91 --> 1.75");

break;

case 5:

printf("86-88 --> 2.00");

break;

case 6:

printf("83-85 --> 2.25");

break;

case 7:

printf("80-82 --> 2.50");

break;

case 8:

printf("77-79 --> 2.75");

break;

case 9:

printf("75-76 --> 3.00");

break;

case 10:

printf("Below 75 --> 5.00");


break;

default:

printf("Better luck next time :)");

return 0;

• OUTPUT
GRADES REMARK:

75 - 100 --> PASSED

TRANSMUTTED GRADES:

92-94 --> 1.50

You might also like