0% found this document useful (0 votes)
406 views1 page

Prog 1 C++ PDF

This C++ program asks the user to input two numbers, adds them together, and displays the sum. It includes the input/output libraries, declares two float variables to hold the user-input numbers and one to hold the sum, uses cin to input the numbers, calculates the sum by adding the numbers, and uses cout to output the sum.

Uploaded by

Pawan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
406 views1 page

Prog 1 C++ PDF

This C++ program asks the user to input two numbers, adds them together, and displays the sum. It includes the input/output libraries, declares two float variables to hold the user-input numbers and one to hold the sum, uses cin to input the numbers, calculates the sum by adding the numbers, and uses cout to output the sum.

Uploaded by

Pawan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

My first c++ program

Program:1
/* sum of two numbers*/

#include<iostream>

#include<conio.h>

using namespace std;

int main()

float no1,no2,sum;

cout<<"enter two numbers :";

cin>>no1>>no2;

sum= no1+no2;

cout<<"sum="<<sum<<"\n";

getch();

Output :
enter two numbers :

45

63

sum=108

Written By: Pawan Kumar


CSE 2nd year
Date: 01/08/2020
18:47:17 श नवार, 1 अग त 2020

You might also like