Skip to content

Instantly share code, notes, and snippets.

@Redeem-Grimm-Satoshi
Created March 25, 2020 17:46
Show Gist options
  • Select an option

  • Save Redeem-Grimm-Satoshi/68d83058a04a3671bbafbea261f6a563 to your computer and use it in GitHub Desktop.

Select an option

Save Redeem-Grimm-Satoshi/68d83058a04a3671bbafbea261f6a563 to your computer and use it in GitHub Desktop.
Temperature And Suitable Sporting Activity
/**
*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