New Some File
This commit is contained in:
parent
3ea952c33b
commit
ca60fd748e
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"cmake.configureOnOpen": false
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
#include <iostream>
|
||||||
|
using namespace std;
|
|
@ -0,0 +1,20 @@
|
||||||
|
#include <cstdio>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <iostream>
|
||||||
|
using namespace std;
|
||||||
|
struct student {
|
||||||
|
char name[20];
|
||||||
|
char sex;
|
||||||
|
int score;
|
||||||
|
} studentList[3] = {{"SB1", 'F', 239}, {"SB2", 'F', 232}, {"SB3", 'M', 832}};
|
||||||
|
int main() {
|
||||||
|
student *ptr;
|
||||||
|
cout << setw(9) << "Name "
|
||||||
|
<< "Sex "
|
||||||
|
<< "Score " << endl;
|
||||||
|
for (ptr = studentList; ptr < studentList + 3; ptr++) {
|
||||||
|
cout << setw(9) << ptr->name << " " << setw(1) << ptr->sex << " "
|
||||||
|
<< setw(3) << ptr->score << endl;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in New Issue