Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a cobol program on below requirement . Given the following three values total number of maximum chocolates you can eat. 1 . Money you

write a cobol program on below requirement .Given the following three values total number of maximum chocolates you can eat.
1.Money you have to buy the chocolates.
2.Price: price of a chocolate.
3.wrap number of wrapers to be returned for getting one extra chocolate.
all are positive integers and greathan 1
Please write cobol program and test for 4 inputs and give outputs also.
example:-
Money =15
Price =1
Wrap =3
output =22
explanation :- but and eat 15 chocolates.
return 15 wrapers and get 5 more chocolates (because for every 3 wrapers they will get 1 chocolate)
eat 5 chocolates and give 3 wrapers and hold 2 wrapers with you.
eat 1 chocolate and give 3 wrapers (old 2+ current wrapers)
get 1 more chocolate.
so total 22.
using cobol ACCEPT verb. please test using online compiler also test throughly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

Describe new developments in the design of pay structures. page 475

Answered: 1 week ago