Posts

Showing posts with the label Addition Program

Addition program in a CPP Language

Image
How to add Five numbers with Cpp programming? #include <iostream> #include<conio.h> using namespace std; int main () { int foo [5] = {16, 2, 77, 40, 12071}; int n, result=0;   for ( n=0 ; n<5 ; ++n )   {     result += foo[n];   }   cout << result; getch(); } Output Result