63 057
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #17970 in C++ for apoorva

Question #17970
Write a complete C++ program that reads a float array having 15 elements. The program uses a function reverse() to reverse this array. Make suitable assumptions wherever required.(avoid use of printf,getline,etc.)
Expert's answer
#include <iostream>
using namespace std;


int main(){
float array[15], arrayq[15];
for (int i = 0 ; i < 15 ; i++){
& cin>>array[i];
}
for(int i = 0 ; i < 15 ; i++){
& arrayq[i] = array[14-i];
}


for (int i = 0 ; i < 15 ; i++){
& cout<<arrayq[i]<<' ';
}

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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions