Home > Back-end >  All written in c
All written in c

Time:10-03

1. The use of c + + string class, 5 string input by means of circulation, then through the way of circulation will be displayed after five string in reverse order, for example, reverse the five before the string is: Germany Japan America Britain France after according to reverse the order of the output string is France Britain America Japan Germany
2. Set up an array of objects, through the loop, 5 students use keyboard input data (student number, the result); With a pointer to the first element array, the output 1,3,5 student data, requirements: students of class with the constructor,
3. Set up an array of objects, through the loop, 5 students use keyboard input data (student number, the result), set up a function Max with a pointer to the object as a function parameter, in Max function to find five students scored the highest, and output the student id, requirements: students in the class with the constructor,

CodePudding user response:

This is not too difficult, suggest to write the first, it won't ask again

CodePudding user response:

1/f, beginners reference side response:
this is not too difficult, suggest to write the first, don't ask

This said, is there obviously to assignments

CodePudding user response:

The operations would not write (smile)

CodePudding user response:

The change, the first subscript I -, the other is not you asked yesterday, an array of objects is an array of each element is the object, the action object

CodePudding user response:

You can be so?

CodePudding user response:

First direct is an array of strings, then reverse traversal output line, such as the for (int I=you input the number of times; I> 0; I -)
The second, third and traversal

CodePudding user response:

Too lazy, don't you can't even write class definition???????
Don't you come for the code you worked out???????

CodePudding user response:

refer to 6th floor N - N - N response:
first direct is an array of strings, then reverse traversal output line, such as the for (int I=you input the number of times; I> 0; I -)
The second, third and traversal

This seems to be wrong, you of the array subscript is 0
 
For (int I=array length - 1. I>=0; - I)

This is right

CodePudding user response:

All points question is simple

CodePudding user response:

1. STD: : string and STD: : list the push_back it is OK and reverse iterator
The second question. For % 2 judgment index index can be 135 024
The third topic, Max this is very simple, take and the constructor of the book is also a foundation of the foundation, if don't listen to the teacher so that no third

CodePudding user response:

The
references to the tenth floor ggglivw response:
1. STD: : string and STD: : list the push_back and reverse iterator just OK
The second question. For % 2 judgment index index can be 135 024
The third question, Max this is very simple, take and the constructor of the book is also a foundation of the foundation, if the third topic will not listen to the teacher so that no

Agree to the tenth floor, if not all, so no class
  • Related