Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

coding in c Task 1: (Individual Task for Submission) For this task, we will get an introduction to our arithmetic operators. We will focus on

coding in c
image text in transcribed
Task 1: (Individual Task for Submission) For this task, we will get an introduction to our arithmetic operators. We will focus on integer division and the modulus operator. In addition, we will learn a concept called casting, which converts one data type to another. Casting isn't available between every data type, but in some instances, like integer and floats, there is a logical method for the conversion. Following the format provided in the examples, you will request the user provide you with two integer values. Once received, your program will calculate the integer division of the two numbers and print this to the screen. Given the two examples below, we can see that the limitations of integers (or lack of decimal places) can quickly lead to miscalculations. We can use casting to quickly convert to decimal without redeclaring our variable. So in part 2, you will calculate this value without redeclaring your variables as float or double. Finally, in part 3, you will redisplay your original first number to demonstrate it was unchanged and provide the number's last two digits from back to front. Example Execution: Please input two integer numbers Part 1: List and divide the two numbers: Integer Diviston ts 20/10 = 2 Part 2: Casting Division- cast your numerator to produce the proper value. Part 3: Identify the last two digits (one per line) from your first number 20: 20 10 2.00 0 2 Please input two integer numbers 133 10 Part 1: List and divide the two numbers: Integer Division is 133/18 = 13 Part 2: Casting Division cast your numerator to produce the proper value. 13.30 Part 3: Identify the last two digits (one per line) from your first number 133: 3 3

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

More Books

Students also viewed these Databases questions