Answer to Question #135317 in C++ for John Carl Mendevil

Question #135317
Sam wants to create a program that required 20 integers. Suppose the following numbers are the value input as A [10] = {-10, 20, 30, 40, – 50, -60, -70, 30, 90, 10} and B[10] = {15, 12, 13,14, – 50, -60, -20, 25, 35, 30}.
1
Expert's answer
2020-09-28T10:56:38-0400
#include <iostream>

using namespace std;

int main()
{
	const int size = 10;
	int A[size], B[size];


	cout << "Enter ten numbers in the array A: ";

	for (int i = 0; i < size; i++)
		cin >> A[i];


	cout << "Enter ten numbers in the array B: ";

	for (int i = 0; i < size; i++)
		cin >> B[i];


	cout << "\n\n";


	cout << "Array A:";
	for (int i = 0; i < size; i++)
		cout << ' ' << A[i];


	cout << '\n';


	cout << "Array B:";
	for (int i = 0; i < 10; i++)
		cout << ' ' << B[i];


	cout << "\n\n";


	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS