Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please C# Assignment2C Useless Conversions: Many message boards and chat applications allow users to set up bots, small scripts that automatically respond when they detect
Please C#
Assignment2C Useless Conversions: Many message boards and chat applications allow users to set up "bots", small scripts that automatically respond when they detect certain words in a message. In our opinion, one of the more amusing bots is the "Useless Converter" bot. When it encounters a standard unit of measure like meters or miles, it converts the value into an unusual format such as "number of sandwiches" or "length of laptops" and responds with this information. For this lab, you are going to replicate this bot with two different "useless" units of measure. You will prompt the user to to enter a number in miles. Then, you will convert that value into the number of refrigerators that would fit in that distance. You will also convert the original value into the number of candy bars that would fit in that distance. Finally, you will print out both numbers to the user. Important Note: For the purposes of this assignment, 1 candy bar converts to 0.0000848327 miles, and 1 refrigerator converts to 0.00105745 miles. You will need to save these values as CONSTANTs, and use them in your equations. Since we can't have half of a refrigerator, you'll need to cast the final result to a long data type after you've performed the conversion. The algorithm output is as shown below, with user input in bold. Save your source code in a file called Assignment2C (with a file extension of .cpp, .cs or java) Sample Output: Enter a number of miles: 14.3 You: I walked 14.3 miles today #fitnessgoals Useless Conversion Bot: Wow, 14.3 miles is 13523 refrigerators long! Useless Conversion Bot: 14.3 miles is also 168567 candy bars long! Useless Conversion Bot: That's a lot Step 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