ReePrime China
C++ tutorial how to write Calculator Program- VirtualStudySolution

此内容来自第三方平台 (Dailymotion)。如果此视频侵犯了您的版权,请使用 立即删除 工具。

C++ tutorial how to write Calculator Program- VirtualStudySolution

2 次观看 12:07 Zohaib khan

描述

Write a C++ program to MAke Simple calculator C++ Exercise :
This tutorial is for newbie C++ programmers.
A friend recommended me trying to make a simple calculator so here is my first shot.

Write a program and call it calc.cpp which is the basic calculator and receives three values from input via keyboard.
 in this C++ tutorial The first value as an operator (Op1) should be a char type and one of (+, -, *, /, s) characters with the following meanings:
o ‘+’ for addition (num1 + num2)
o ‘-’ for subtraction (num1 - num2)
o ‘*’ for multiplication (num1 * num2)
o ‘/’ for division (num1 / num2)
o ‘s’ for swap
in this C++ tutorial Program should receive another two operands (Num1, Num2) which could be float or integer.
 in this C++ tutorial The program should apply the first given operator (Op1) into the operands (Num1, Num2) and prints the relevant results with related messages in the screen.
 in this C++ tutorial Swap operator exchanges the content (swap) of two variables, for this task you are not allowed to use any further variables (You should use just two variables to swap).

for Solution Visit:
http://virtualstudysolutions.blogspot.com/2015/03/c-program-to-make-simple-calculator.html