Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual effort • You can answer on the sheet or a separate sheet Type out each of the following programs, and answer the questions. Be sure that you have the debugger working for the Dev-C++ (or whatever C compiler that you are using). Hopefully we will take up the experiments during class. Base Experiment 1: • Type out the following code in your compiler This is base code that we will modify in the following experiments (our base operating reference) #include <stdio.h> int main(void) { int Value1, Value2; PRETT printf("Please enter the first value"); scanf("%d",&Value1); printf("Please enter the second value"); scanf("%d",& Value2); Value1= Value1 + Value2; printf("The result is %d", Value1); return 0; } 1. Confirm that the program works as expected by entering 2 different integers. 2. For the first number enter a character instead of an integer and note what happens on the screen. Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual effort • You can answer on the sheet or a separate sheet Type out each of the following programs, and answer the questions. Be sure that you have the debugger working for the Dev-C++ (or whatever C compiler that you are using). Hopefully we will take up the experiments during class. Base Experiment 1: • Type out the following code in your compiler This is base code that we will modify in the following experiments (our base operating reference) #include <stdio.h> int main(void) { int Value1, Value2; PRETT printf("Please enter the first value"); scanf("%d",&Value1); printf("Please enter the second value"); scanf("%d",& Value2); Value1= Value1 + Value2; printf("The result is %d", Value1); return 0; } 1. Confirm that the program works as expected by entering 2 different integers. 2. For the first number enter a character instead of an integer and note what happens on the screen. Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual effort • You can answer on the sheet or a separate sheet Type out each of the following programs, and answer the questions. Be sure that you have the debugger working for the Dev-C++ (or whatever C compiler that you are using). Hopefully we will take up the experiments during class. Base Experiment 1: • Type out the following code in your compiler This is base code that we will modify in the following experiments (our base operating reference) #include <stdio.h> int main(void) { int Value1, Value2; PRETT printf("Please enter the first value"); scanf("%d",&Value1); printf("Please enter the second value"); scanf("%d",& Value2); Value1= Value1 + Value2; printf("The result is %d", Value1); return 0; } 1. Confirm that the program works as expected by entering 2 different integers. 2. For the first number enter a character instead of an integer and note what happens on the screen. Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual effort • You can answer on the sheet or a separate sheet Type out each of the following programs, and answer the questions. Be sure that you have the debugger working for the Dev-C++ (or whatever C compiler that you are using). Hopefully we will take up the experiments during class. Base Experiment 1: • Type out the following code in your compiler This is base code that we will modify in the following experiments (our base operating reference) #include <stdio.h> int main(void) { int Value1, Value2; PRETT printf("Please enter the first value"); scanf("%d",&Value1); printf("Please enter the second value"); scanf("%d",& Value2); Value1= Value1 + Value2; printf("The result is %d", Value1); return 0; } 1. Confirm that the program works as expected by entering 2 different integers. 2. For the first number enter a character instead of an integer and note what happens on the screen.
Expert Answer:
Answer rating: 100% (QA)
The image contains an assignment task related to a C programming exercise that involves the use of s... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
1. What is the difference between cash accounting and accrual accounting? 2. Explain the concept of depreciation and how it is calculated. 3. What is the purpose of the trial balance in accounting?...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
Use the data in the table to complete the following. (a) Make a scatterplot of the data. Estimate a value for b so that f(x) = 0.0002x b models the data. (b) Check the accuracy of f(x). (c) The moon...
-
Youngs double-slit experiment underlies the Instrument Landing System used to guide aircraft to safe landings when the visibility is poor. Although real systems are more complicated than the example...
-
With regard to Chargaff s experiment described in Figure 9.13, answer the following: A. What is the purpose of paper chromatography? B. Explain why it is necessary to remove the bases in order to...
-
In a survey of 1002 U.S. adults, 88% said that fake news has caused a great deal of confusion or some confusion. Determine whether the number is a parameter or a statistic. Explain your reasoning.
-
Included in Adams Companys December 31, 2012, trial balance are the following accounts: Accounts Payable $220,000; Pension Asset/Liability $375,000; Discount on Bonds Payable $29,000; Unearned...
-
Use the squeeze theorem to evaluate lim 2 x sin (4x). lim 2 x sin (4x)= Number 0
-
Bottle-Up Inc., was organized on January 7, 2008, and made its S election on January 24, 2008. The necessary consents to the election were filed in a timely manner. Its address is 1234 Hill Street,...
-
Luke has decided to invest in mutual funds within a registered retirement savings plan (RRSP). The mutual fund he wants to invest in has a net asset value per unit (NA VPU) of $12.00 with a 5%...
-
The Breakfast Coffee Club's (TBCC) inventory activity for their House Blend is shown below for the month of July. TBCC use a perpetual inventory system: Date 1 July 7 July 9 July 14 July 30 July...
-
12. Is the following unbalanced reaction thermodynamically favorable? Why or why not? 2+ 2+ +
-
Management of Ice Cold is contemplating the purchase of twelve new ice cream trucks. The company plans to establish new routes for each of the trucks near the beaches in Southern California where the...
-
Consider the pseudo-code of BubbleSort below. Find the runtime of Bubble Sort(A, n) in e notation. Show your steps. BubbleSort(A, n) /*Sorts an array A[1..n] of n real numbers*/ for i=1 to n-1 do /*...
-
Picturetronics just reported earnings per share of $3.00 and paid out dividends of $0.60. Assume that Picturetronics' earnings will grow 16% a year for the next 2 years and that the dividend payout...
-
Eye Co., a shipping company headquartered and incorporated in State I, signed a contract with Kay Co., a company headquartered and incorporated in State K, to transport goods for Kay Co. from State K...
-
Propose a reasonable mechanism for the following reaction. OH
-
In the 2012 tax year, Michelle paid the following amounts relating to her 2010 tax return: Tax deficiency..........................................$5,000 Negligence...
-
Jerry made the following contributions during 2012: His synagogue (by check).....................................................$680 The Democratic Party (by check)...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
A \(0.40-\mathrm{m}\) wire carries a current of \(1.7 \mathrm{~A}\) and is at angle to a \(0.20-\mathrm{T}\) uniform external magnetic field. What must be the angle between the wire and the magnetic...
-
A square loop of side \(a=50 \mathrm{~cm}\) is suspended from the left arm of a scale, which is kept at equilibrium by adding weights to the right side. The lower half of the loop is in a uniform...
-
A square loop of wire has a perimeter of \(60 \mathrm{~cm}\) and is oriented such that two of its parallel sides form a \(30^{\circ}\) angle with the horizontal. A uniform horizontal magnetic field...
Study smarter with the SolutionInn App