Answer to Question #213562 in C++ for amey

Question #213562

Write the program segment for the following questions. ALL question are not

related.


1. set the array mark with size 10 using input statement

2. set the first three elements of array itemX using input statement

3. set the third element until the sixth element of array itemX using input statement

4. set the array array with size 5 with the following data: 3, 5, 7, 9, and 11


1
Expert's answer
2021-07-04T17:11:57-0400
a) int n; 
 cout<<"Enter the mark\n";
cin>>n;
int arr[n];
b) int i;
int itemX[10];
 for(i=0; i<2; i++){
 cin>>itemX[i];
}
c)
int itemX[10];
 for(i=2; i<5; i++){
 cin>>itemX[i];
}
d) 
int arr[5] = { 3, 5, 7, 9,11};

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