Search
 
SCRIPT & CODE EXAMPLE
 

CPP

How to add numbers in c++

#include <iostream>

int main() {
  std::cout << "Hello & Welcome to Adding Calculator Application.
";

  // Create the Variables (FirstNumber & SecondNumber)
  int FirstNumber = 0, SecondNumber = 0;

  // Get the First Number
  std::cout << "Please enter your first number: ";
  std::cin >> FirstNumber;

  // Get the Second Number
  std::cout << "Please enter your second number: ";
  std::cin >> SecondNumber;

  // Add the two numbers
  int Sum = FirstNumber + SecondNumber;
  std::cout << "The Sum of the two numbers is: "<< Sum;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: delete file cpp 
Cpp :: min vector c++ 
Cpp :: run c++ file putty 
Cpp :: switch case with string c++ 
Cpp :: check if float has decimals c++ 
Cpp :: count word accurances in a string c++ 
Cpp :: arduino buildin let 
Cpp :: c++ measure time in microseconds 
Cpp :: difference between lower and upper bound 
Cpp :: fiunction in c++ 
Cpp :: c++ declare variable 
Cpp :: sort using lambda c++ 
Cpp :: c++ count number of element in vector 
Cpp :: Rick Astley - Never Gonna Give You Up 
Cpp :: c++ vector fill 
Cpp :: c++ add object to array 
Cpp :: nth node from end of linked list 
Cpp :: c++ initialize multidimensional vector 
Cpp :: vector search by element 
Cpp :: c++ get ascii value of char 
Cpp :: round double to 2 decimal places c++ 
Cpp :: check if char in string c++ 
Cpp :: c++ remove last character from string 
Cpp :: clear qlayout 
Cpp :: fast way to check if a number is prime C++ 
Cpp :: how to sort in c++ 
Cpp :: find the missing number 
Cpp :: c++ ternary operator 
Cpp :: memory leak in cpp 
Cpp :: substr in cpp 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =