Menu Close

Create a programming logic to display the type of spinach using the calorie value…[Cprogm]FTC

Aru runs a small hotel near the popular university. The hotel also runs very well due to the high taste. All the menus in the hotel will be over without overdoing it.

But Aru used to cook a kind of spinach every day at his hotel but that spinach only goes to the trash every day.  Due to this not only the students studying in the college but also the teachers avoided spinach.

So Aru wants to display the name of a spinach, its usefulness, and the nutrients in it in the minds of the students and teachers of the college.
So can you create an programming logic for Aru according to his request?

Functional Description:

Watercress has Vitamin A & Vitamin C
Iceberg has Folate and Copper
Radicchio has Source of Calcium
Arugula has Source of Iron

Input:
The first line integer input benefits based on calorie value

Output:
Print the required output in single line.

#include <stdio.h>
typedef enum{Iceberg=15,Radicchio=20,Watercress=10,Arugula=21}Lettuce;
int main()
{
 Lettuce benefits;
 scanf("%u",&benefits);
 if(benefits==Iceberg)
 printf("Folate and Copper");
 else if(benefits == Radicchio)
 printf("Source of Calcium");
 else if(benefits == Watercress)
 printf("Vitamin A & Vitamin C");
 else if(benefits == Arugula)
 printf("Source of Iron");
 else
 printf("Invalid Search");
return 0;}


INPUT_1:
20

OUTPUT:
Source of Calcium


INPUT_2:
12

OUTPUT:
Invalid Search


INPUT_3:
10

OUTPUT:
Vitamin A & Vitamin C


INPUT_4:
15

OUTPUT:
Folate and Copper


ILLUSTRATION

Executed using gcc