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]<<' '; }
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment