project-team-b

project-team-b created by GitHub Classroom


Project maintained by csci3250-2019 Hosted on GitHub Pages — Theme by mattgraham

Introduction

Code

#include <stdio.h>
int main()
{
   unsigned int num;
   char c;
   printf("Hi\n");
   printf("Do you like egg tarts? y/n? \n");
   while(1){
      scanf(" %c" , &c);
      if ( c == 'y'){
         printf("You have good taste!\n");
         break;
      }
      else if ( c == 'n'){
         printf("What a pity!\n");
         break;
      }
      else printf("Please enter only y or n! \n");
   } 
   printf("I like egg tarts.\n");
   printf("How many egg tarts have I eaten today?\n");
   scanf("%u", &num);
   printf("OMG! There's totally %u Cal !!!\n", num*217);
   printf("Carson wants to eat all of them!\n");
   printf("There is just totally %u Cal.\n",num*217);
   printf("SO I eat %u egg tarts everyday.\n",num);
   if(num <= 10)
      printf("Carson is still healthy!\n");
   else
      printf("So bad, Carson is becoming a fat guy...\n");
   return 0;
}

Build Status

Contributors

Last Edit Time: 2019-04-24 18:17:53 +0000