Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSBP112: Introduction to Programming LAB #2 Name: ID: bjectives e objective of this lab: To become familiar with the basic components of a C++ program,

image text in transcribed

CSBP112: Introduction to Programming LAB #2 Name: ID: bjectives e objective of this lab: To become familiar with the basic components of a C++ program, inc identifiers, data types, arithmetic operators. . To edit, compile, run, and test your application. cercise #1: Redo your homework 1 to complete the following: a) Make sure cin is used for input. b) Change to file input ("input.txt") and file output ("output.txt"). cercise #2: Write a program to do: a) Prompts the user to input three test grades. Each grade is an integer nur b) Prints the three grades one per line in reverse order of input and labeled Testi, Test2, and Test3. c) Finds the sum of the three tests and their average. d) Prints the sum and average of the three tests. ample input/output: (The average is supposed to be actually 74.33, so why di ow to fix it to get an accurate average resulta) Enter three grades: 69 73 The grades that you entered are: Test3: 81 Test2: 73 Test1: 69 The sum of the grades is: 223 The average grade is: 74 omework #2: Redo the above Exercise 2 to read the test info (a) from a file est.txt". Then output the results (b) to a file "grade.txt

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

Advances In Databases 28th British National Conference On Databases Bncod 28 Manchester Uk July 2011 Revised Selected Papers Lncs 7051

Authors: Alvaro A.A. Fernandes ,Alasdair J.G. Gray ,Khalid Belhajjame

2011th Edition

3642245765, 978-3642245763

Students also viewed these Databases questions