Monday, November 23, 2020

Program to add numbers until user enters 0 using C++

For many other Language Programs related to C++ , Data Structure microprocessor 8086 etc... related to MSBTE, Computer engineering, IT
 Visit our  BLOG 


//to add numbers till user inpus 0.
#include<iostream>
using namespace std;
int main()
{
int num,sum=0;
do
{
cout<<"enter number :  ";
cin>>num;
sum=sum+num;
}while(num!=0);
cout<<"total  =  "<<sum;
return 0;
}


Programs:-

For many other Language Programs of microprocessor 8086, C++ , Data Structures visit our  BLOG 

There are programs of Object-Oriented Programing, Operators (logical, arithmethic ,relational,etc) ,exception handeling , inheritance ,string operations ,etc



  

No comments:

Post a Comment