C++ Programming How to find a Sum using an Array
This Program will show you how to find a sum of Different Numbers using Arrays in C++ Language
Note : you can use any Numbers to find their Sun.
Program # 4 : Find the Sum using an Array
#include <iostream>using namespace std;int main(){int avg[] = {6,14,100,40,40};int sum = 0;for(int x=0; x<5; x++){sum += avg[x];cout << sum << endl;}}
Note : you can use any Numbers to find their Sun.
Post a Comment
Please Don't Spam You are allowed to comment your website link