of no subject

As I stand here today with the world as my witness,
I pledge to you my undying and eerlasting loe.
I will stand beside you as your partner,
I will stand before you as your protector,
And I will stand behind you as your solace.
Please spend and end your life with me.
For, you see, each day I loe you more,
today more than yesterday and less than tomorrow。
Your lips speak soft sweetness,
Your touch a cool caress
I am lost in your magic,
my heart beats within your chest。
I think of you each morning,
and dream of you each night。
I think of your arms being around me,
and cannot express my delight。
neer hae I fallen,
but I am quickly on my way。
You hold a heart in your hands
that has neer before been gien away。
I wrote your name in the sky,
but the wind blew it away;
I wrote your name in the sand,
but the waes washed it away;
I wrote your name in my heart,
And foreer it will stay.
Loe is ... loe is the greatest feeling,
Loe is like a play,
Loe is what I feel for you, each and eery day,
Loe is like a smile,
Loe is like a song,
Loe is a great emotion, that keeps us going strong.
I loe you with my heart,
My body and my soul.
I loe the way I keep loing,
Like a loe I can't control,
So remember when your eyes meet mine.
I loe you with all my heart,
And I hae poured my entire soul into you,
Right from the ery start.
My loe, my loe is like an ocean:
It goes down so deep;
My loe is like a rose:
Whose beauty you want to keep;
My loe is like a rier;
That will neer end;
My loe is like a doe,
With a beautiful message to send.
My loe is like a song
That goes on and on foreer
My loe is like a prisoner
It's to you that I surrender.[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8341852/viewspace-903869/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8341852/viewspace-903869/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Sure, here's a C program that implements the student information management system with the menu interface you specified: ```c #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_STUDENTS 100 struct student { int id; char name[50]; char gender[10]; int scores[3]; int total_score; }; int read_int() { int n; while (scanf("%d", &n) != 1) { printf("Invalid input, please enter an integer: "); scanf("%*[^\n]"); } scanf("%*[^\n]"); scanf("%*c"); return n; } void read_string(char* str, int max_len) { char* p = fgets(str, max_len, stdin); if (p == NULL) { printf("Invalid input, please try again: "); read_string(str, max_len); } else { int len = strlen(str); if (len > 0 && str[len - 1] == '\n') { str[len - 1] = '\0'; } } } void enter_student_info(struct student* students, int num_students) { printf("Enter student information:\n"); for (int i = 0; i < num_students; i++) { printf("Student %d:\n", i + 1); printf(" ID: "); students[i].id = read_int(); printf(" Name: "); read_string(students[i].name, sizeof(students[i].name)); printf(" Gender: "); read_string(students[i].gender, sizeof(students[i].gender)); for (int j = 0; j < 3; j++) { printf(" Score in course %d: ", j + 1); students[i].scores[j] = read_int(); while (students[i].scores[j] < 0 || students[i].scores[j] > 100) { printf("Invalid score, please enter a score between 0 and 100: "); students[i].scores[j] = read_int(); } } students[i].total_score = students[i].scores[0] + students[i].scores[1] + students[i].scores[2]; } } void display_student_info(const struct student* students, int num_students) { printf("ID Name Gender Course 1 Course 2 Course 3 Total\n"); printf("----------------------------------------------------------------\n"); for (int i = 0; i < num_students; i++) { printf("%-5d%-19s%-8s%-9d%-9d%-9d%-5d\n", students[i].id, students[i].name, students[i].gender, students[i].scores[0], students[i].scores[1], students[i].scores[2], students[i].total_score); } } int main() { struct student students[MAX_STUDENTS]; int num_students = 0; while (1) { printf("Student information management system:\n"); printf("1) Enter student information\n"); printf("2) Display student information\n"); printf("3) Exit\n"); printf("Please enter a choice (1-3): "); int choice = read_int(); switch (choice) { case 1: printf("Enter the number of students: "); num_students = read_int(); while (num_students < 1 || num_students > MAX_STUDENTS) { printf("Invalid number of students, please enter a number between 1 and %d: ", MAX_STUDENTS); num_students = read_int(); } enter_student_info(students, num_students); printf("Student information entered successfully.\n"); break; case 2: if (num_students == 0) { printf("No student information entered yet.\n"); } else { display_student_info(students, num_students); } break; case 3: printf("Exiting...\n"); exit(0); default: printf("Invalid choice, please enter a number between 1 and 3.\n"); } } return 0; } ``` This program uses a struct to store the information of each student, and an array of structs to store the information of all students. The `read_int()` function and `read_string()` function are used for input validation, to make sure that the user enters valid integers and strings. The `enter_student_info()` function prompts the user to enter the information of each student, validates the scores, and calculates the total score. The `display_student_info()` function displays the student information in a formatted table. The `main()` function implements the menu interface and calls the other functions based on the user's choice. The program also includes some fault tolerance measures, such as checking the number of students entered, checking the validity of the scores, and handling invalid input.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值