answersLogoWhite

0

#include<iostream>

int main

{

int x=40, y=2;

std::cout<<"The sum of "<<x<<" and "<<y<<" is "<<x+y<<std::endl;

}

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

How do you add more than two numbers in C plus plus?

sum = a + b + c;


C plus plus programming for addition of two numbers?

int main() { int x = 40 + 2; }


What are programming language that produced c?

C is a programming language. Example of C or C++ Programing would be the following: add matrices, get ip address, and read files.


IN cobol programming language what is the meaning of add AB giving C?

Let c = a+b


What does increments mean in C programming?

It has nothing to do with C, it simply means: add 1 to a variable.


Write a program to add two numbers using oop?

#include&lt;iostream.h&gt; #include&lt;conio.h&gt; void main() { int a, b, c; clrscr(); cout&lt;&lt;"enter the two numbers"; cin&gt;&gt;a; cin&gt;b; c=a+b; cout&lt;&lt;"Addition of two numbers="&lt;&lt;c; getch(); }


What is the need for c plus plus?

Primarily to add object oriented programming methods to the C language.


How do you find the average of three numbers using vb script?

Add the numbers, then divide by three. I don't know vb script, but in most programming languages it would be something like this: result = (a + b + c) / 3


What are the two major types of programming languages in c plus plus?

Object oriented programming and structured programming.


Write a program in C programming language that will add two integer numbers using linked list?

#include&lt;stdio.h&gt; int add(int pk,int pm); main() { int k ,i,m; m=2; k=3; i=add(k,m); printf("The value of addition is %d\n",i); getch(); } int add(int pk,int pm) { if(pm==0) return(pk); else return(1+add(pk,pm-1)); } &lt;/stdio.h&gt;


How do you add two numbers with out using operator in c language?

Not possible. Of course you can call a function which does the addition for you, but function-calling is also an operator in C.


What programming languages use a C switch statement?

There are two programming languages which use a C switch statement. The two languages are C and C++, hence the name C switch statement. There may be more, but those are the most obvious ones