Created
March 25, 2020 17:46
-
-
Save Redeem-Grimm-Satoshi/68d83058a04a3671bbafbea261f6a563 to your computer and use it in GitHub Desktop.
Temperature And Suitable Sporting Activity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| *Author: Redeem Grimm | |
| *File Name: LakeLazyDays.c | |
| *Purpose: Tells The Sporting Activity Suitable For A Certain Temperature | |
| **/ | |
| #include<stdio.h> | |
| int main(){ | |
| //variable | |
| int temp; | |
| //prompting user | |
| printf("Enter Temperature: "); | |
| scanf("%d",&temp); | |
| //conditions | |
| if(temp>95 || temp<20){ | |
| printf("Visit our shops!\n"); | |
| }else if(temp>=80){ | |
| printf("Swimming\n"); | |
| }else if(temp>=60 && temp<80){ | |
| printf("Tennis\n"); | |
| }else if(temp>=40 && temp<60){ | |
| printf("Golf\n"); | |
| }else{ | |
| printf("Skiing\n"); | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment