Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Its C++ When I run/Compile my code this is the error it shows me Here is the errors And this is the assignment im doing

Its C++
When I run/Compile my code this is the error it shows me
image text in transcribed
image text in transcribed
Here is the errors
image text in transcribed
And this is the assignment im doing
image text in transcribed
please if you kmow how to do it attach with me the clear code
If get second old anount cout "enter first old pound amount: ") int pound 2 , shi112, pence2 cin pound2 dot1 shi1112 dot2 pence 2 ; II compute the total int totaloldpound =8, totaloldshill =, totaloldpence =83 1/12 pence to a shilling if (pence1 + pence 2 = 12) ( totaloldshil1 = (pence1 + pence) /12 ] totaloldpence = (pence1 + pence 2)12 1/20 shilling to a pound if (totalo1dshi11 + shil11 + shi112 > = 20) 1 totalo1dPound =( totaloldshi11 + shi111 + shi112) /205 ) totaloldshi11 ( totaloldshi11 + shi111 + shi1112) 20) // total pounds totaloldPound - totaloldPound + pound1 + pound2 1/ display the volues If convert to a neu noney int totalliewound =8, totalfiewpence = i 1/ Convert shill into new pence totalNewPence - (totaloldPence * (totaloldshil1 - 12)) 2.43 totalfiewpound - totaloldPounds I/ 100 pence to a new pounds if(totalNewPence >- 10e) \& totalNewPound to totaWewpence / 10e3 totalWewpence = totalNewpence 160s lines 55 Lenath 1506 Insert Done parsing in 1.734 seconds Debug assignment 1 chapter 1.cpp Compiler (11) Resources difh Compile Log Debug Find Results Close: Col File Message C:ICSCI1730 \assignment 1 chapter 1.cpp In function 'int main0': 9 CilCSCl1730lassignment 1 chapter 1.cpp [Error] 'pound1' was not declared in this scope CilCSC11730 assignment 1 chapter 1.cpp [Error] expected initializer before 'cin' 14 CilCSCl1730lassignment 1 chapter 1.cpp. [Error] 'pence?' was not declared in this scope C:ICSCI1730 1 assignment 1 chapter 1.Cpp [Error] 'pence' was not declared in this scope CiCSCI1730 assignment 1 chapter 1.cpp [Error] 'pence2' was not declared in this scope C.ICSCI1730\assignment 1 chapter 1.Cpp [Error] 'totalOldShill' was not declared in this scope C: CSCi1730 assignment 1 chapter 1.cpp [Error] 'totalOldPound' was not declared in this scope 19 CiCSCl1730lassignment 1 chapter 1.cpp [Error] 'totalOldPence' was not declared in this scope C:ICSCI1730lassignment 1 chapter 1.cpp [Error] 'totalNewPound' was not deciared in this scope 78 CilCSCI1730lassignment 1 chapter 1.cpp [Error] 'end1' was not declared in this scope 1. Before the 1950's, Great Britain used a monetary system based on pounds, shillings, and pence. There were 20 shillings to a pound, and 12 pence to a shilling. The notation for this old system used the pound sign, , and two decimal points, so that, for example, 5.2.8 meant 5 pounds, 2 shillings, and 8 pence. We'll call this system old-pounds. The new monetary system, introduced in the 1950's, consists of only pounds and pence, with 100 pence to a pound (like U.S. dollars and cents). We'll call this system decimal-pounds. So, 5.2.8 in the old-pounds is 5.13 in decimal-pounds. Write a program that asks the user to enter two money amounts expressed in old-pounds and will then add the two amounts and display the answer both in old-pounds and in decimal-pounds. Program requirements: a) Read the numbers into integer variables and then make use of the integer division and remainder (\%) operators to do the needed arithmetic for both calculations of the old-pounds sum as well as the decimal-pounds equivalent. b) To read in the old-pound amounts, make use of the fact that the extraction operator (>>) can be chained to read in more than one quantity at once. For example: cin pound dot shill dot pence; will read an old-pound amount into integer variables pound, shill, and pence, and read the "dots" into the character variables dot and dot. Here is an example of a user's interaction with the program (user input is bold): Enter first old-pound amount: 5.10.11 Enter second old-pound amount: 3.19.5 Old-pound total =9.10.4 Decimal-pound total =9.51

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

a sin(2x) x Let f(x)=2x+1 In(be)

Answered: 1 week ago