Encerrado

Simple Calculator Program

You are to write a small calculator program as a console application in C++. The program should have the following functionality:

The program should then repeatedly read and process calculations written in the form:

number operator number =

e.g.

20 + 10 =

where operator can be +, -,* , / and the numbers are type float not integer.

If valid numbers were read in (test with [url removed, login to view]()) then the program will go on to test the operator and =, otherwise if non-numeric characters were read in then clear the error ([url removed, login to view](0)), empty the buffer ([url removed, login to view](128, ‘\n’)) and output the error message:

ERROR 3: invalid numeric input

If the last character entered is and the operator belongs to the set +, -,* , / then carry out the sum and output the result in the form:

number operator number = answer

e.g.

20 + 10 = 30

In the case of division, check the second number to see whether it is 0.0; if it is, output the message:

ERROR 4: unable to divide by zero

If the last character is not ‘=‘ then, assuming the user typed ‘&‘ instead of output the error message:

ERROR 1: & read in where = was expected

And if the operator did not belong to the set +, -, /, * then, assuming the user typed ? instead, output the error message

ERROR 2: ? read in where +, -, I, or * expected

After each calculation prompt and read as follows:

Another calculation (YIN)?

If their reply is ‘y or ‘Y’ then prompt for the next calculation, otherwise output a summary of successful calculations as follows:

There were 10 out of 23 successful calculations.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.

## Platform

Visual C++

Habilidades: Programação C, Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software

Ver mais: float programming, programming operator, calculator programming, calculator program php, answer set programming, yin, simple console, integer programming, invalid character error, buffer source code, simple application program, program output, php check input type, complete calculation test, application ignore, calculator php program, code calculator, calculator console, application calculator, visual calculator, php form calculator, answer programming test, simple software program, cin calculator, division zero php

Acerca do Empregador:
( 2 comentários ) United Kingdom

ID do Projeto: #2966793

37 freelancers estão ofertando em média $23 para este trabalho

prabhatsaini

See private message.

$17 USD in 2 dias
(147 Comentários)
6.9
ndima

See private message.

$8.5 USD in 2 dias
(96 Comentários)
6.6
NeoOneC

See private message.

$11.05 USD in 2 dias
(117 Comentários)
6.6
mihaiscortaru

See private message.

$16.99 USD in 2 dias
(160 Comentários)
6.0
idleswell

See private message.

$17 USD in 2 dias
(174 Comentários)
5.9
emilianbold

See private message.

$8.5 USD in 2 dias
(77 Comentários)
5.8
tamassl

See private message.

$25.5 USD in 2 dias
(21 Comentários)
5.1
yosevw

See private message.

$4.25 USD in 2 dias
(30 Comentários)
5.0
projetcoder

See private message.

$17 USD in 2 dias
(39 Comentários)
5.0
kyrnetsoftware

See private message.

$85 USD in 2 dias
(13 Comentários)
4.8
leepwo

See private message.

$21.25 USD in 2 dias
(41 Comentários)
4.7
shahizanvw

See private message.

$8.5 USD in 2 dias
(46 Comentários)
4.6
vw139994vw

See private message.

$21.25 USD in 2 dias
(60 Comentários)
4.5
vw821235vw

See private message.

$6.8 USD in 2 dias
(94 Comentários)
4.3
bladvw

See private message.

$34 USD in 2 dias
(24 Comentários)
4.6
lalesculiviu

See private message.

$25.5 USD in 2 dias
(18 Comentários)
4.2
drizztgr

See private message.

$34 USD in 2 dias
(31 Comentários)
3.9
teamvw

See private message.

$14.45 USD in 2 dias
(36 Comentários)
3.8
russellsmithvw

See private message.

$6.8 USD in 2 dias
(23 Comentários)
3.4
nsmith100

See private message.

$25.5 USD in 2 dias
(15 Comentários)
3.3