63 200
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #30897 in C++ for omer moiz

Question #30897
Write a Computer Program that takes 10 Characters From a User. Hold all the Characters in a Character Array, Ask the user the Point Where the Arrays divided, Make 2 sub-arrays from a Single Array and Count the Numbers of Elements in the Second Array.
Expert's answer
#include <iostream>#include <stdlib>
using namespace;
char array[10];
int number;
int main()
{
cout<<"Input 10 characters"<<endl;
for (inti=0;i<10;i++) cin>>char[i];
cout<<"Input number <10"<<endl;
cin>>>number;
chararray_new1(number), array_new2(10-number);
for (int i=0;i<number;i++){
array_new1[i]=array[i];
cout<<array_new1[i];
}
cout<<endl;
for (inti=number; i<10;i++){
array_new2[i]=array[i];
cout<<array_new2[i];
}
cout<<endl;
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