| |

VerySource

 Forgot password?
 Register
Search
View: 1373|Reply: 10

Learn Chinese to ask the simplest C homework

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-25 03:40:01
| Show all posts |Read mode
I'm learning Chinese. I don't know anything about these. To be honest, I have no interest. I hope that elder brother and sister can help. Thank you!

Topic 2: String Processing
Write a program to implement the following functions: delete specified characters from a string. Uppercase and lowercase of the same letter are treated as different characters.
For example: if the input string during program execution is: turbo c and borland c ++
Enter characters from the keyboard: n, then the output becomes: turbo c ad borlad c ++
If the entered character does not exist in the string, the string is output as is.
Requires a string to be obtained from the keyboard. Note that the input and output interface is friendly.


Topic 3: Print the pattern
Using the loop control method, print out the following patterns
       *
      **
     ***
    ****
       ****
       ***
       **
       *

Topic 4: Student Score Processing (1)
There are 4 students in a class and 5 courses. (1) Find the average score of the first course; (2) Find out the students who failed two or more courses, and output their student numbers and all course grades and average grades. (3) Find students with an average score of 90 or higher or a score of 85 or higher in all courses. Program three functions to achieve the above three requirements.


Topic 5: Student Score Processing (2)
There are ten students, and each student's data includes student number, name, and grades of three courses. Enter the data of 10 students from the keyboard, and print the total average scores of the three courses, as well as the data of the highest score students (including the student number, name, grades of the three courses and their average grades)
Requirement: use structure to represent students
Reply

Use magic Report

0

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-2-12 22:45:01
| Show all posts
mark
Reply

Use magic Report

1

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-2-13 16:30:01
| Show all posts
Purely manual work.
Signed.
Reply

Use magic Report

0

Threads

25

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-2-14 19:00:01
| Show all posts
two
#include <string>
using namespace std;
void main ()
{
typedef string :: size_type size_type;
size_type startPos;

char ch;
string str ("turbo c and borland c ++");
scanf ("% c",&ch);

while ((startPos = str.find ('L'))! = string :: npos)
{
str.erase (str.begin () + startPos);
};

}
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-14 19:39:49
| Show all posts
No technical content, physical activity
Reply

Use magic Report

0

Threads

25

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-2-14 20:00:01
| Show all posts
#include <string>
using namespace std;
void main ()
{
typedef string :: size_type size_type;
size_type startPos;

char ch;
string str ("turbo c and borland c ++");
scanf ("% c",&ch);

while ((startPos = str.find (ch))! = string :: npos)
{
str.erase (str.begin () + startPos);
};
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-5-24 10:45:01
| Show all posts
The younger brother has never learned, only this garbage level. 5555

three

#include <iostream>

int main ()
{

for (int i = 1; i <= 8; i ++)

{
    if (i <= 4)
{
for (int k = 1; k <= 4-i; k ++)
 cout << "";
for (int k = 1; k <= i; k ++)
 cout << "*";
 cout << endl;
}


else
{
for (int l = 1; l <= 3; l ++)
cout << "";

for (int k = 1; k <= 8-i + 1; k ++)
 cout << "*";
for (int k = 1; k <= 8-i-1; k ++)
 cout << "";
 cout << endl;
}
}

return 0;
}
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-5 15:45:01
| Show all posts
Bang top.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-8 18:30:01
| Show all posts
Do I learn English?
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Invalid IP Address

Post time: 2020-8-8 18:45:01
| Show all posts
Those who learn Chinese are special
Actually our computer
The hours of learning programming language courses are not more than other majors
The impression given to other majors is that our computer professionals learn programming every day
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list