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.)
1
Expert's answer
2012-11-06T09:39:40-0500
#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]<<' '; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment