Sunday, August 16, 2020

Temperature Checker in C

 A temperature program that I wrote using C programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com


Sample Program Output

Program Listing


#include <stdio.h>

int main()
{   

char *temp_value[] = {"ICE","WATER","STEAM"};
                      
char  *display_temp; 

    int temperature = 0;
    printf("\n\n");
printf("\tTemperature Checker in C");
printf("\n\n");
printf("\tWhat is the Temperature? : ");
    scanf("%d",&temperature);
   
   if (temperature < 0) {
    display_temp = temp_value[0];
   } else if (temperature > 100) {
    display_temp = temp_value[2];
   }
     
    switch(temperature) {
     case 0 : case 1 : case 2 : case 3 : case 4 : case 5: 
     case 6 : case 7 : case 8 : case 9 : case 10: 
     case 11 : case 12 : case 13 : case 14 : case 15: 
     case 16 : case 17 : case 18 : case 19 : case 20: 
     case 21 : case 22 : case 23 : case 24 : case 25: 
     case 26 : case 27 : case 28 : case 29 : case 30: 
     case 31 : case 32 : case 33 : case 34 : case 35: 
     case 36 : case 37 : case 38 : case 39 : case 40: 
     case 41 : case 42 : case 43 : case 44 : case 45: 
     case 46 : case 47 : case 48 : case 49 : case 50: 
     case 51 : case 52 : case 53 : case 54 : case 55: 
     case 56 : case 57 : case 58 : case 59 : case 60: 
     case 61 : case 62 : case 63 : case 64 : case 65: 
     case 66 : case 67 : case 68 : case 69 : case 70: 
case 71 : case 72 : case 73 : case 74 : case 75: 
     case 76 : case 77 : case 78 : case 79 : case 80: 
     case 81 : case 82 : case 83 : case 84 : case 85: 
     case 86 : case 87 : case 88 : case 89 : case 90: 
     case 91 : case 92 : case 93 : case 94 : case 95: 
case 96 : case 97 : case 98 : case 99 : case 100: 
display_temp = temp_value[1];
         break;
    }
    
    printf("\n\n");
printf("\tThe Temperature is %s.", display_temp);
printf("\n\n");
printf("\tEnd of Program");
printf("\n");
}


No comments:

Post a Comment