Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1st photo is the question and the 2nd photo is the sample output ITEM EGG RICE JUICE BREAD NUTS SOUP CALORIE SHEET QUANTITY CALORIE VALUE
1st photo is the question and the 2nd photo is the sample output
ITEM EGG RICE JUICE BREAD NUTS SOUP CALORIE SHEET QUANTITY CALORIE VALUE 1 80 1 PLATE 120 1 CUP 120 1 SUCE 90 1 CUP 300 1 CUP 75 Table 1 Table 1 shows 'Calorie Sheet' which gives information about the calorie value of each item based on the given quantity. Taking the above Table 1 as reference, write a C program to calculate the total number of calories consumed by the USER in two [2] days through three (3) different meals. YOU MUST USE ARRAY/S, FOR LOOP/S AND IF-ELSE CONDITION WHEREVER NECESSARY. Create only one program as All questions are interlinked. [DO NOT USE STRUCTURES] Follow the questions below to Write/Create a single C program. Name the file as lab_exam.c Q.1 The C Program must first take input of your name. Q.2 Then take input of any item (item must be from the list of item names given in table 1 above) and also, the quantity of the item, consumed for two days - Day 1 and Day 2 Q.3 Based on the calories consumed by the user for each of the Two (2) days. Calculate the total calories consumed. Output the total calories with the name of the user. Your program should show output as below. [SCROLL DOWN] W. .. CE ... w WWW. . WWW KUTER YOUR NAME pean Sonic,DAY 1 CT WITH FROM (8. Jukw,r4), mits er ] NALI AD ALSO THE COSTITY OF *45 TIEN SELECT ANY 1 ETER FRO(se, pics, face,treso, nuts er cous) TORAL 2 WE ALSO THE GUANTITY OF THE ETERN AY ITO "E8, rice je rasite or ] * WA SO VIVO THIS SOLAK DAY ULICT AN 1 Terno festrice.fatebreed, ts er sowo) PEAL 1 WD ALSO THE CUTITY OF VETEM uice BELECE ANY INTROW (oss, rice Juice, trest,uts er tous] RAL AND ALSO THE CITY ULTER read SELECT ANY 1 THTRO fes rice dulce.bread, st or soug] PEAL 340 2130 THE GUANTITY OF TIKITEN TOTAL CALORIES CONCURED NY Sounit VE 3'5 IS 1075 **Your Code and the Output must be pasted hereStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started