answersLogoWhite

0

#include <iostream>

int main()

{

double num1 = 0.0;

std::cout << "Enter first number: ";

std::cin >> num1;

double num2 = 0.0;

std::cout << "Enter second number: ";

std::cin >> num2;

std::cout << num1 << " + " << num2 << " = " << (num1 + num2);

return 0;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Program to generate Fibonacci series using storage class in c plus plus?

i dn't know. haha


A program c plus plus on automorphic numbers or not?

how to write a program that counts automorphic number from 1 to 999


How do you write a C plus plus program that will display the first 10 positive prime numbers?

By learning how to program on C+.


Write c plus plus program for new and delete operator using class?

#include&lt;iostream&gt; class foo{ int m_data; }; int main() { foo* p=new foo; delete( foo), foo=NULL; return(0); }


C plus plus program to find all even numbers between 100 and 150 using for loop?

#includeint main(){int i;for(i=2;i


Write a c plus plus program to find the largest among three numbers using ternary operators?

R = (A &gt; B &amp;&amp; A &gt; C) ? A : (B &gt; C) ? B : C; // parentheses not necessary - for clarity only


Explain instantiation of objects in c plus plus?

Instantiation of a class literally means creating an instance of a class. This is the process of allocating memory for an object that you can use in your program.


How to Write a c plus plus program to print number from 1 to 500?

#include using std::cout;using std::endl;int main(viod){cout


C plus plus program using a stacks converting a postfix-infix?

Yes


Can you use c in c plus plus without using class and object?

Sure.


Program to get a system time using c plus plus?

time in hours second minute


A class in a program whose objects are created and destroyed throughout the program It is desired that the total number of live objects in the program be known how you do this in C plus plus?

Create a static member variable to contain the count. This variable is common to all instances of the class.Initialize that variable to zero at the beginning of the program.In the class constructor, increment the variable.In the class destructor, decrement the variable.