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...
-
The femur bone in the human leg has a minimum effective cross section of about 3.0cm2 (= 3.0 X 10-4 m2). How much compressive force can it withstand before breaking?
-
1. Consider the following game: Burger King Low Price Status Quo Heavy Advertising McDonalds Low Price Status Quo Heavy Advertising 60,35 65, 20 55,45 40,40 60,40 45,55 55,45 60,30 60, 40 a) Who are...
-
Suppose the probabilities are 0.89,0.09, and 0.02 that the finish on a new car will be rated acceptable, easily repairable, or unacceptable. Find the probability that, among 20 cars painted one...
-
Three point charges are arranged on a line. Charge q3 = + 5.00 nC and is at the origin. Charge q2 = - 3.00 nC and is at x = +4.00cm. Charge q1 is at x = +2.00cm. What is q1 (magnitude and sign) if...
-
Open the jail.conf file and locate the default bantime and reset it to five minutes. Locate the number of retries in the ssh-iptables section and reset it to 3. Close and save the file. Restart the...
-
Suppose the prices of zero-coupon bonds paying $100 at maturity are: Price Time to maturity (years) $96.15 1 $90.70 2 $83.96 3 $76.29 4 Bond B1 B B3 B4 a. [1pt] What is the price of the 3-year coupon...
-
Solve logx81-4 for x.
-
Doxie was convicted of wire fraud (cheating a company out of about a million dollars) and of tax evasion because he did not report the money he stole as income. He received 53 months in prison after...
-
Farraj worked at a law firm that represented plaintiffs in a suit against tobacco companies. Plaintiffs lawyers prepared a trial plan over 400 pages long that included strategy, deposition summaries,...
-
A block of mass \(m=0.50 \mathrm{~kg}\) is suspended from a spring of spring constant \(k=100 \mathrm{~N} / \mathrm{m}\). (a) How far below the end of the relaxed spring at \(x_{0}\) is the...
-
The Packs bought a home from a seller who claimed to have done a complete renovation on the house. In fact, there were major problems with the basement, foundation, electrical, and HVAC systems. The...
-
Eating bags of microwave popcorn for years is claimed to cause popcorn lung from inhalation of the flavoring used on the popcorn. Plaintiffs with the medical problem sued the popcorn makers and the...
-
Sales Manager Assumes that Ontario's Sale of Goods Act Appliesto "His" Contracts Questions: 1) Is the sale manager correct in his assumption that the saleof goods act of Ontario applies to each of...
-
(a) Explain why the concentration of dissolved oxygen in freshwater is an important indicator of the quality of the water. (b) How is the solubility of oxygen in water affected by increasing...
-
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...
-
The position vector along a trajectory expressed in terms of the scalar distance \(s\) from the origin is given by the relation \(\mathbf{r}=\mathbf{a} s^{2}+\mathbf{b} s+\mathbf{c}\), with the...
-
A particle moves on a predetermined trajectory with the equation of motion \(s(t)=k t^{2}\), with \(k\) constant and with magnitude of the acceleration equal to \(a=2 k\). Show by using (3.74) that...
-
A particle is constrained to move on a circular guideway of radius \(R=3.00 \mathrm{~m}\), on which it can slide without friction, according to the motion equation law \(s(t)=k t^{3}\), with \(k=2.0...
Study smarter with the SolutionInn App