Write A Program To Store and Calculate The Sum of 5 Numbers Entered by The User Using Arrays
Write A Program To Store and Calculate The Sum of 5 Numbers Entered by The User Using Arrays
Write a program to store and calculate the sum of 5 numbers entered by the user using
arrays.
#include <iostream.h>
int main()
{
int numbers[5], sum = 0;
cout << "Enter 5 numbers: ";
return 0;
}
2. Write C++ Program that display all elements of an initialized two dimensional array.
#include <iostream.h>
int main() {
int test[3][2] = {
{2, -5},
{4, 0},
{9, 1}
};
return 0;
}
3. Write a program that Display largest number of an array b(elements entered by
user )
#include <iostream.h>
int main()
{
int i, n;
float arr[100];
return 0;
}
4. Write a program that add Two Matrices using Multi-dimensional Arrays.
#include <iostream.h>
int main()
{
int r, c, a[100][100], b[100][100], sum[100][100], i,
j;
cout << endl << "Enter elements of 1st matrix: " <<
endl;
return 0;
}