0 like 0 dislike
6.5k views

The remind.c program prints a one-month list of daily reminders.

• The user will enter a series of reminders, with each prefixed by a day of the month.

• When the user enters 0 instead of a valid day, the program will print a list of all reminders entered, sorted by day. Use LIFO ( Last In First Out) for reminders in the same day.

• Ignore a reminder if the corresponding day is negative or larger than 31

Example input:

24 Susan's birthday
5 9:00 - Meeting with Daniel
5 7:00 - Dinner with Marge and Russ
26 Movie - "Chinatown"
7 10:30 - Dental appointment
12 15:00 Movie - "Dazed and Confused"
5 Saturday class
12 Saturday class
12 20:00 - Theatre - "Hamlet"
0

Example output:

Day Reminder
  5 Saturday class
  5 7:00 - Dinner with Marge and Russ
  5 9:00 - Meeting with Daniel
  7 10:30 - Dental appointment
 12 20:00 - Theatre - "Hamlet"
 12 Saturday class
 12 15:00 Movie - "Dazed and Confused"
 24 Susan's birthday
 26 Movie - "Chinatown"

 

asked in Midterm by (12.1k points)
reshown by | 6.5k views

46 Answers

0 like 0 dislike
Hidden content!
#include <stdio.h>



struct E{

    int date;
**** * ** * ** ** **** *** * ** event[50];

}reminder[100], mod;

int i, j, k, end;



void arrange(void);

void print(void);



int main(void){
**** ******* ** * ** **** i<100; i++){
* * * * * * * ***** * * * * *** * ****** ** *** * *** * &reminder[i].date);
* * * * * * * * ** * *** ** * * * *** * ** * *** * * * break;
* ** * *** ** *** ** ** ******* * ** ** ** *** ******
* **** **** ** * ***** *** ** *** * * * * * ** * ** ***** * i);
** * * * *** ** * * ** *** ** ** * ** * * * ** ** || reminder[i].date<0 ){
* * ** * * ** **** * * *** ** * * *** * * * *** ** *
* **** *** ** ** * ** * ** * ** **** ** * ***** * *** ** * * ***** ** *
* ** ** * * *** ** * * ** * **

    }
*** * ** ** * * *
** *** * *** * ******* ******
* * ** **** ** * * * * ** *
* * * ** * * * * 0;

}



void arrange(void){
* * * * ** * * * k=0; i<=31; i++){
** * ** * * * ** * * * ** ** j>=k; j--){
*** * ** * * ** * * ******** * ** **** * *** ** ** * * ** * **** * *
** * * ***** * * ***** * * *** ** * ** ** **** * * ** ** * ** ** *** * * * ** * ** *** ******
*** * * *** **** * **** ** * * * ** * ** * * ******* * **** * ** ** ** ** *** ** *** ** **
** * *** ****** * ****** * * ** **** * ** * * * ** ** * * ***** * * ** * ** * ** * * ** *** **** *
* * * ** * * * ** * *** * * *** * ***** * * **** * * *** * * * * ***
* *** ******* * * * ** * ** ***** * * **** ** * * **** * ** ** * ** * ** ** * *
* **** * ** *** * * * * **** * *** *** ** * *** ** ***** ** * *
* **** ** * * ***** *** ** ** * * * * **

    }

}



void print(void){
* **** ****** ** ** ****** * *** * * Reminder\n");
** **** * ** * ***** * * i<=end; i++){
** * ** * ** **** ** * ****** * * * ** * ** * * %2d%s\n", reminder[i].date, reminder[i].event);

    }

}
answered by (-581 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<string.h>

#include<ctype.h>

int i, j, k, end, count=0;



struct reminder{

    int date;
* * * * * ** * ** * ** day[3];
* ** * ** * *** rem[100];
* *** *** *** * * **** * *



void scan(void)

{
** * * * ** ** ***
*** * ***** * *** ** * ** * *
* ** **** * * ** * ** * * ** **** *** ** ** &line[i].date);
* ** *** * *** * * *** * ** **** *** * * * "%2d", line[i].date);
* ** *** * ** * ** ** * **** * *** ******* * ** *** * ***
** ******** ****** ** ** * * *** *** ** ****** * ** * * *
* * ** * **** *** ** * ** * * **** * * * * *
* ** **** * * * * * **** *** ***** * *** * ** *** * **** *
** ** * * * * * * *** * * * ** ** ** ** *** line[i].rem);
* * *** * ** * ** **** ** **** ** ** ** *** *

    }

    end = i-1;

}



void sort(void)

{
* *** * * * * * temp[100];

    int temp2;
* * **** *** ********
* ** * * * * * ****** * * * ****
** * * ** * ** **** * ** * ** ***** ***** ******* ** ***** * ****
**** **** * **** * * *** * * ** * * ****** * ******** ** ***** * *** ** * **** * * *


*** * * ** ** * ** ** * * *** * ** **** * ** *** ** **** * ** * **** **** ** ** * ** * ** * * line[i].day);
** * ***** * * * * * *********** * **** *** ** * ** * * * * * ** ** *** ******* ***** * ** line[j].day);
* * * * ** * *** *** *** **** ****** * ** * * ****** * *** ** * **** ** *** * *** * ** temp);
** *** ** *** **** * * *** * * * ** ****** ** ***** ** * ***** * * * ** *** ** ** * * * ** *
* ** ** * * * ** * * * * ** ***** *** * *** ** * ** *** ** **** * ** ** * * * * *** * *****
*** * * ** * * * * * *** ***** * * * *** ** ** ** * * ** **** ***** ** ** * ** * * ** *
* ***** **** ****** * ** * * * ** ** * * *** * * * * ** * ** ****
**** *** ** *** **** ** * * * * ****** * * ***

    }

}



void print(void)

{
** ** *** ** * ** * ***** reminder");
**** ** *** * ** * *** *** * **
** ** * * * ** *** * * ** ** * * **** ******* **** * *** %s", line[i].day);

    }

}



int main()

{
* ** ** * ** ***** * *
*** *** **** * * *** *
** ** ** * * ** ***** ***

}
answered by (-368 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>



struct E{

    int date;
*** *** * * *** * *** *** event[50];

}reminder[100], mod;

int i, j, k, end;



void arrange(void);

void print(void);



int main(void){
* ** * * * *** * *** ** i<100; i++){
**** ** * *** ** * **** *** ** * ** *** **** * ** * *** &reminder[i].date);
** *** ** *** ** * ******* ** *** * * *** *** *** * * * break;
* * * *** * ** *** * * ** * *** * * ** *** * * *** * || reminder[i].date<0 ){
* **** **** **** ** ** ** * ** ** * ** * * ******* *** * ****
* **** ** * * * * ** ** *** * *** ** * * * * * * * * ** ** *
* * * * * * ****** * * * ** * * ** * *
** * * * * *** ** ** * **** ****** * * *** ** * ** ******* * *

    }
* * * *** **** ** **** ****
**** * ** *** * * * ** * * *
* * * * * * ** ** * * ******
* * * * **** * * ** *** * 0;

}



void arrange(void){
*** * *** ** * *** ** ** **** k=0; i<=31; i++){
** ** * * ****** *** * * * **** j>=k; j--){
**** * ** * * * * *** ** *** * ** ** ** * ** * * * *** * * * * ** *** ** * ***
****** * ** ***** * *** *** * * * *** * ***** *** * * **** ** * * * ******* **
*** * * * * * * ** * ** ** ** * ** * * ** *** * ** * *** ** * ** ** * * * *
****** ** * * * * * ** * * * * ** * *** *** * * ** * * **** *** * * * ***** *** * ** **
* *** *** * ** * * * * ** * ** ** ** * * * ** * * ** ** **** ** * **** * *
****** **** ** ***** * ** * ****** ** * * ** *** *** * ** * ** * * * * * * * **
***** * * *** ******* **** * * *** ** * * * *** *** ** * ** * * * * *
* * ** * * * * *** ** * * * ** * *** ** * *

    }

}



void print(void){
* * * ***** *** *** **** ** ** * ** Reminder\n");
******* * ****** i<=end; i++){
* ***** * * * * *** * ** * ** ** * * ** * ** ** * %2d%s\n", reminder[i].date, reminder[i].event);

    }

}
answered by (-581 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<string.h>

#include<ctype.h>

int i, j, k, end, count=0;



struct reminder{

    int date;
** ** ** **** ** * * * day[3];
** * * **** * ** * ** * * rem[100];
* ** ** * ** ***



void scan(void)

{
*** * ** * **** *** * * * *
* * * ** * ****** **
* ** * * ** * * ***** * * * *** *** * ** *** * * * ** &line[i].date);
* ** ** * * *** *** * * ** * **** * ** * ** * "%2d", line[i].date);
*** * ** * * ** *** * * ** *** * * ******* ** ** * *
** **** **** ** * * * * ***** ** * * * *** *** ***** * * *
* ** * ******* *** ** ** ** ** ** **** ** ** ** * **
*** ** * * * * *** ********** * **** * * *** ** **
* ** * * * * ** ******* * * * ***** * * **** ** * line[i].rem);
*** * **** * **** ** * * * * * * *****

    }

    end = i-1;

}



void sort(void)

{
** * ** ** ***** *** ** * temp[100];

    int temp2;
* * ********* * * *
**** *** * ** ** * *** * ****
****** * * * ***** ******** *** **** **** * * * * ** * **
* * * * ** * * * *** * * * * *** ** ** * **** * *** *** *** ** * * * *** ******* * ** ** **** ** **


** ******* * ****** * * ** * * *** ** ******** * ** * ***** ** * *** **** ** * * ** ** line[i].day);
** **** * * * * ** ********* *** ****** * * * *** * * * ******* * * ** * * ** *** *** * * line[j].day);
* ** * * ** * * * ***** *** ** * * * * * * * * ****** **** ** ** * * * * **** *** ** * ** ** ** temp);
**** * * ** * * * * * * **** * * *** * *** * **** *** *** * * **** ** * ** * *** ***** ** **
**** * * * ** * ** *** * ** **** * ** ** * **** ** ** * ****** ** * *** * ** ** ** * **** *** * * ** * * *
* * ** *** ** ** **** * * **** * ******** * **** ********** * * * * ** * *** ** * * ** **** **
* *** **** * * ** ***** *** **** * * ** * * * ** * * ***
* *** *** * * * ** ******* ** * * ** ****

    }

}



void print(void)

{
* * * **** ** ** * * * * * * reminder\n");
* * ** * * **** * **** *
** ** * **** * ** * ** ** ** * ** * * *** * %s\n", line[i].day);

    }

}



int main()

{
** ** **** *** ** * * *
*** *** * * ** *** *
*** * ** *** * ** * ***** **

}
answered by (-368 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>



struct E{
* ** * ** * * * *** date;
** **** * * ** * * * ** event[50];

}reminder[100], mod;

int i, j, k, end;



void arrange(void);

void print(void);



int main(void){
****** * * *** ****** * * ** i<100; i++){
** * * *** * **** * * * ** ******** * *** * * * &reminder[i].date);
* * * ******* ** * *** ** * ** ***** ***** ***** * ******* break;
* *** * *** *** * ** ** * * * ** * ** * ** ** ** * ** ** *

    }
*** ** *** * * * * ** * **
* *** **** * *********** **
* * * ** *** * * ** * * *
** ** *** * ** ** **** 0;

}



void arrange(void){
* * * * ***** * * ***** * k=0; i<=31; i++){
** * * * *** * ** *** * * * * ** *** *** j>=k; j--){
* *** ** * * * * ** * ** ** ** * * * **** ** * *** * * *** ****
* ** ** ** * ** * ** ** * ** * * ** ** ** * * * ** * ** * * * * * ** *** ** * *
*** * ** * *** * ** * * ** * ** ** ***** **** ** * * * * ** * ** * ** * * * * ** * ** ******
* * * * ** ** * ***** ** * * * ** * ** * * * * ** * * *** * *** * * * * ******* * * ************** * ***
* *** * * ** ****** * * * * ** ** ** * * ** ** ******** ** * *** ** * * * * * *
*** ** * ***** * * *** * * * ***** * *** * * **** * * ** ** * *** * * * **
***** ** ****** * ** ** * * * ** ** * ** * ** *** ** ***
* * ** ** * *** ****** * ** * * * * ** *
* * ** * ** ** **

}



void print(void){
* * *** ****** ****** * ** * Reminder\n");
* ****** * ** *** * ** * * i<=end; i++){
*** * ** * *** * * ** ** * * **** ** ** * %2d%s\n", reminder[i].date, reminder[i].event);

    }

}
answered by (-581 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<string.h>



int main(void)

{

    int i,j,n=0,day;

    char date[3],note[100],reminder[100][100],exch[103];



    while(1)

    {
*** * ****** ****** ** ** **** * ** ** ***** ** ** * **** *
**** ******** ** * ** ****** ** * * ** * ** * * *
* ** ** * **** * ** **** ** ** * **** * ** **
* * * ****** ** ** * * ** * * * ** ** * ***** * * **** * **
** * * ** *** ** * ** *** ** * ** * * **


** * ** * * **** * * * ** ** *** ** * ** **** * * ** *** ****
* ** * * ** * * * * * * * **
* *** *** ** *** ** *** ** * * * * ** * ** * * * ** ** * *** ** ***** ** *** * * * * * **** *
* *** *** ****** * * * * ** * * * * ** * ** * * * * * * * *** * ** ***
* *** *** ** *** ****** *** *** * * *** * * ***** * * * ** ***** * ** *
** * * ** * * * **** * ** * * * ***** *** **

    }


**** ** * ** * * ****** *** * ** ** *

    {
** *** * ** ** * * * * ** * **** * * *** ** * * * **
* * * ** * * * * * * ** *** * ** ****
* **** *** **** ****** * ** *** * ** ***** ** * * *** * ** ** ** * ** * *** * * * * ** ** * * * * * * * * *
* * ** ****** * * ***** **** * ***** * * * ** ** * *
** ** * *** * ** **** *** ** **** * *** * *** * * * * ***** * * ****** * * *** * * * *** * ** ** * * **** ***
** ** *** ** *** * *** * * ** ***** * * ** * * * * ***** * ** *************** **** ** * ****** ** *
** ** * **** ** ** * ** * * * *** *** *** * * **** ** * ** ** * ** * **** * * * * ** *
***** ****** * ** ** ** * *** **** ** * ** **** * * * * * * * * ***
*** * * ** ****** * ****** *** ****** * * ******

    }
*** *** **** * * * * * Reminder\n");
* * *** * ** *** * ** * * * *

    {
* ** * * ***** *** ** **** * ***** * *** * ** * **** * * %s\n",reminder[i]);

    }

    return 0;

}
answered by (-412 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<string.h>



int main(void)

{

    int i,j,n=0,day;

    char date[3],note[100],reminder[100][100],exch[103];



    while(1)

    {
** ** * * **** * ******** ** ** * ** * ***** **** * * **** **
*** * * * * * *** ** ***** * *** * * * *
**** *** * ** * * * *** ** *** ******** * * * *
* * ** * * **** ** ** * *** * * * ***** * *** ** *** * ** ** *
* * **** **** * * ** *** *** * ** ***


***** * * * * *** ** * *** ***** ** * ** * ** * * *** ** ** *** ******
* * * * * ** *** *** * * * ** ** ** ** * * * *
* * ** *** ** * *** *** * * **** * * * * ****** * * *** * ** ***** *** * ** **
************ ** * ** * * * * * **** * * * * **** * *** * * * ***** *** ***** * *
* * *** ** * ** * ** *** * * ** ***** * * * ******** * * ** **** *** * * ** *** *
** * *** * * * ** * * ** ** *** ** *

    }


* * * *** * ** ** * * *** *

    {
** ** ** * **** * *** * ** * * ** ** * * ** ** * **
* *** * * * ** * ** * ** * * * * *
** ** * * ** ***** * * ** *** * ** * ** ** * * * * ** * ** * ** * *** * * * * **** * ** * **** * * *
* **** * * *** * **** *** * * *** * **** * * ** *** ** ** ** * * *
* * * * *** ** *** **** * *** * * * * *** *** ** ** * ***** ** *** * * * * ** ** *** * *
* * ** ** * *** ** ** *** * **** * *** * * *** ***** *** ** * * * * *** * **** ** ** * **
*** * ** **** *** * ** * ******* ** * ******** *** ******** * *** * ** ** *** ** * * ******* * **** *
** ** * ********** * * *** ** ** *** **** *** * ** * * * * ***
** * * *** * *** ** * * * * *** ** *** **

    }
* * ** * ***** **** ** * ** * *** Reminder\n");
* * *** * * ** * ** ***** *** **

    {
* * * *** *** * * ** * * *** ******* * * ** * * ** %s\n",reminder[i]);

    }

    return 0;

}
answered by (-412 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<string.h>



int main(void)

{

    int i,j,n=0,day;

    char date[3],note[100],reminder[100][100],exch[103];



    while(1)

    {
** * ** * ***** * **** ***** *** ** * *** ** * *** * * ** ** * **
** * * **** * **** *** ** * *** ** *
* ***** * *** **** * * * * ** ** **** * * ** *
* * * ** *** * * * ** * * * ** ** ** * ** ** * ** *** ******
** * * * ****** ** ** *** ** * * ** * * * *


** *** ** ******** * * * **** *** * * *** * ** **** * * * *** ** * *
* **** ***** *** * * ** *** ** * *** * ** ** ***
**** * * * * **** ** ** **** * ** ***** *** * * ** ** **** ** * *** ** ** ** *
* * ***** * * ** * * ***** ** * * ***** * ** ******** * * * *** ** * ** ** *
* * ** * * * *** ** *** *** * * ** ****** **** *** ** * * * * * * * ** * ** **
* **** * * * * * * ** ** ** * * * ***

    }


******* * ***** * * **** *** * **

    {
* * * **** * *** * ** ** ** * * * * * **** **
* ** ** * * ** * * * *** *** ***
* ** *** ** ** *** ** **** ******** * ***** * * * * * * ** * ** * * * * *** *** **** ** *** ** * * * * ****
* * **** ******** ** * * * * * *** * * *** ** * * * ** ****
** *** *** * * **** * * * * *** ***** ** * * ** ** * * *** * * * * * ** * * * *** * *
** ***** ** ** ** ******* *** * *** * * * *** *** * * * * * *** *** * * *** * ** ***** * ** * ** * ** ** * *** *
* * * * * * * ** ** * *** * * *** ** *** * * * ** * **** ** * * ** *** ** ** ** ****
* ** ** * * * * * * * * * ** * *** ****** * ****** *
* **** * *** * * * * **** * * * *

    }
* ** * * * * ******* * ******* Reminder\n");
****** * * * ** * *** ** ********** *

    {
* * ** * * *** * *** ** **** ** ***** %s\n",reminder[i]);

    }

    return 0;

}
answered by (-412 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<string.h>



int main(void)

{

    int i,j,n=0,day;

    char date[3],note[100],reminder[100][100],exch[103];



    while(1)

    {
* *** * ** * *** * ** * **** * * * ** **** * * ** * *
* * ****** * ** * * * * * ** **** * * **** *
* ***** ***** ** ** * * * *** * **** **** * ** ** * * ** *** *** * **
** *** * *** *** *** ** ** * * * *** ** ** * *


* * *** * * * * ***** * * * * * * * ***** * * * * * *** * * ***
*** ** ** ** ***** * * * * ** * ** **
* * * ***** **** *** *** ******** * * * ** * **** *** *** * ****** ** ** ****** **
*** * ** ** * ** ** *** * *** * * *** * * * ** *** ** ** ** * * **
* * ** ** *** * * ** ** ***** * * ********* * ** ** * *** ***** * ***** * ** ** *
*** ****** ******** * * * * ***** ** * *** *

    }


* ** * ** * * * ** * *** ** *

    {
* * ** * * ***** **** * * * * ** ***** * * *
*** * * ***** **** * * * ****** * ** ** * **
* ** *** ** * ** ** * *** * * ** *** ** * ** *** * * * * * ** * * **** * * *** * * * **
****** ***** ** * * * * *** * * * ** * ** *** * * * *** * ****
*** ** *** ****** ** ** * * * ** *** ** ** * ** * ******** * * * * **** ** *** * * * ***
* * ***** * * * * ** * ** *** * *** ** * * * * * *** ** ** **** ** ** * **** *** ** *** * **** ***** *** * * *** *
* * ** *** ** * *** *** ** *** * * * * *** ** * * ** ** **** *** **** * * * ** * ** ** * ** ** **** ****
***** ** ** * * ** ** ** **** * ** *** * * * *** * * *
* ** * ** * ** * ****** ****** * ** ****** **

    }
* ********** ** * ** *** **** **** ** Reminder\n");
* * *** * ** * *** * * ** * *****

    {
* * * **** ***** * **** * * ** * ***** **** **** %s\n",reminder[i]);

    }

    return 0;

}
answered by (-412 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<string.h>



int main(void)

{

    int i,j,n=0,day;

    char date[3],note[100],reminder[100][100],exch[103];



    while(1)

    {
*** * ** * * * * **** ** * *** * ** ***** **** ** ***
** ***** ****** * *** **** ***** * * * * * ** *** *
** ** * * * * * ** * * * * ** * *** * *** ** ****** *
* **** ** *** * ***** * ** * * *** * ***


*** * * * * * *** **** * * ***** ** **** * * * *** * * ***
* * ** *** ** * * ***** *** * * *** ** * * * **
*** * *** * * ******* **** * ** * * * ** ** ** * * *** * * * **** ** * * * ** *** *
* ** * ** * *** ** * ** * ***** * * * ****** * * ***** * ** * * ** * * * **
** * * *** *** * * ** * ** ******* * * ** *** * * ** * * ** *** ** ** * *******
* * ****** * ** * * * ** * *** * *** ** * ** * *

    }


* ** * *** ** * * * * * ** * **

    {
* * * * ** ** ** ** ***** *** **** * ***** * *** * **
*** ** * ** * ** ** * ** *** * ** * *** *******
** * **** * ** ** * ** *** * * ** *** * * * ** **** ** * *** * *** * *** **** * ** ** ****** * **** * *** * *
***** ** **** ***** * ** * * * ** * *** *** * *** ****** *** **
* ** *** *** * * * * *** **** ** * * * * ** ** * * ** * ******* * ***** * * * ** *
** ** ** * * * **** * ***** ** * * ** * ** * ***** * ** * ** * ** ** * * * *** * * * *
* *** * ** ** ** ******* ** ** * *** * **** * ***** ** ****** *** * *** * * **** *** ** * * *****
* * *** * ** * ***** ******* * ** **** * * *** *** **** ** *
* * ** * ******* ** ****** * * * ** * ** *

    }
****** * * ****** ** * * * ** Reminder\n");
** * *** * ** * * ** * * ***** *

    {
*** **** ** ** ** ** *** **** * * * * ** * *** * %s\n",reminder[i]);

    }

    return 0;

}
answered by (-412 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:104.23.243.108
©2016-2026

Related questions

0 like 0 dislike
6 answers
[Normal] asked Apr 21, 2017 in Midterm by thopd (12.1k points)
ID: 24271 - Available when: Unlimited - Due to: Unlimited
| 1.6k views
0 like 0 dislike
8 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24273 - Available when: Unlimited - Due to: Unlimited
| 1.8k views
0 like 0 dislike
13 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24269 - Available when: Unlimited - Due to: Unlimited
| 2.6k views
0 like 0 dislike
70 answers
[Exam] asked Apr 13, 2017 in Midterm
ID: 23789 - Available when: Unlimited - Due to: Unlimited
| 9.7k views
0 like 0 dislike
44 answers
[Exam] asked Apr 13, 2017 in Midterm
ID: 23785 - Available when: Unlimited - Due to: Unlimited
| 6.6k views
12,783 questions
183,442 answers
172,219 comments
4,824 users