Menu Close

Find the type of spinach using the calorie value

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

Morae Q!

  1. Program to get dictionary items, use update module and items module.
  2. Regular expression allowing certain set of characters.
  3. Compute the Sum of Cosine Series.
  4. Find the Sum of Sine Series.
  5. Remove the Vowels from the string.
  6. Find All Non-Overlapping strings/characters using regular expressions .
  7. Check whether the given string is Panagram or not.
  8. Replacing strings using Regular Expression Regex.
  9. Check whether the given number is Strong number or not.
  10. Find the numbers divisible by a input numbers within the given range.
  11. Change the behaviour of the Regular Expression using flags.
  12. Find the exponentiation of a number.
  13. Find all prime numbers in a range using Sieve of Eratosthenes.
  14. Convert decimal equivalent into binary, hexadecimal and octal.
  15. Compute the area of a farmers field in feet.
  16. Compute time from number of days/hours to seconds.
  17. Precompiled patterns using Regular Expressions .
  18. Compute the price of the cake on the nth day.
  19. Compute the number of possible non-increasing arrays.
  20. Find the type of spinach using the calorie value.