0 like 0 dislike
7.2k 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 | 7.2k views

46 Answers

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

#include<string.h>

int main ()

{

    char reminder[60][60];

    char cday[3], cnotes[60], temp[63];

    int day, i=0, j, k;

    while(1)

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

    }
* * *** *** * ** * ** * *

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

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

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

    }

    return 0;

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

#include <stdlib.h>

#include <string.h>



int main()

{
** ***** **** * ** ***** ** reminder[60][60];
* * * * * * * * * * cday[3], cnotes[60], temp[63];
**** ** * ******* * day, i=0, j, k;


****** ***** * (1)
** * * ** *** * *
*** * * * *** ** **** ********* *** **** **** * * **** * ** &day);
* ** ** ** ** *** *** * ** *** ** **** **** == 0)
** ** **** ***** *** ** * ** ** * ** * ** ** ** * ***** *** ***
* * * ** * * ****** ** * *** ** * * * ** ***
**** * * * **** * *** * **** ** ***** * * * * <= 31 && day >= 1)
* ** * * * ** * *** **** * * *** * * * *
* * ****** ** ** **** **** * * ** * * * * ** ** **** * ****** * ** * * * * ** ** "%2d", day);
** * * *** *** * * ** **** **** ** * ** ***** ***** * * * ** * * * * cday);
* * * ** *** ** **** ** *** **** * ** * * * ****** ** * * ** * * ****** * cnotes);
** * *** * ** * * ***** **** * * *

    }


* ** *** ** *** * * * ** k<i; k++)

    {
* * ** *** * * *** * *** * ** * * *** j<i; j++)
** **** * **** * * * ******* * ** * ***
** *** ** *** ***** **** * * ******** *** ** * * ******* *** ** ** ** * * ** * ** ** * * <= reminder[k][0]*10 + reminder[k][1])
* ***** * * * ** *** **** ***** * * *** * ** ****
* * ** **** ** * * ****** ** * ** ** * *** * *** * ** * ** * ** * ** * ** * * * * ** * ** * reminder[k]);
* ** * ***** **** ** * ** ****** * * **** * ** ** * * * *** ** * * ** * ** *** *** * * * * * reminder[j]);
* *** ** * ** * * * * * *** ** *** *** * ** ***** * ***** ** * * temp);
*** ** * * * ** * ** ** ** ********* * ** ***** ** *** * * * * ***
** ** * ***** * *** * *** ** ****

    }


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


**** * *** * * ** * ** k<i; k++)
**** * * *** * * *** * *** *** ** *** * * * ** ** *** %s\n", reminder[k]);


***** *** * **** * *** * 0;

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

#include <string.h>



int main()

{

    char remind[100][100]={'\0'};

    int date[100]={'\0'},sort[100],a,b,c,i,j,temp;


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

    {
* * * * * **** * ** * * * * ** * ** ** * * * * **** *
** * *** * * ** * * * * **** ** *** ** * * * = date[i];
* * *** * * * ** ** * **** ******** * *** * ****
****** *** * * * * * * *** **** * * ***** **** * ******* ** *
*** ** * *** * * ** ** * * *** ** * ** * ** * * ** *** ** *
* ** * ** ** ******** ** * ****** ** * ** ** * ****
*** * *** ** ****** *** * ** **** ****** * * * *****
** **** ****** * * * ** ** * * * **** ** (date[i]>31 || date[i]<0){
** **** ***** ** * * ** * *** *** * ** ** ** * * ** * * * **
* ** ** * * * *** * ** ** * **** * *** **



    }



    for (i=0; i<a-1; i++){
* * ** * * * * * * *** * ** ** ** * * *** ** j<=a-1; j++){
* * * * **** * ***** ** * *** ******* * ** ****** ******* *** (sort[j] <= sort[i]){
* ** * * ** *** *** ** ** *** ** * ******* * ****** ** ** *** * * *** *** *** ****** * ** **
* ***** * **** *** ***** * * * * * **** * * * * * * * * * ** * ***** * * **** * *** ** *** * * ***
* * *** **** * * *** * * ** ** * **** * ** ** *** * * * * * ** * *** *** * * *
* ** * * *** ** ** * * * * *** * * * * * *** * ** *
* * * * ** ** * ** * ********* ** **

    }

    printf("Day Reminder\n");
***** ** * ** * * * * *** * * *
**** *** * * ** * * ** *** ** ** * * ** * **** * * *
*** * * * * ** ****** * ** ** * *** * * ** * * * ** ** *** * *** * *
** *** ** * * *** ** * * * * * * * ********** ** ****** ** *** *
* **** * * * ** ** * ** * *** * * ****** * * ***** * *** * **** **** **** * * * ** **** * * %2d%s\n",date[j],remind[j]);
* ** *** * ** * * ** * * ** ** * * *** * ** ** *** * * ** * ***** * * * *** **** * ** *** *
* * *** * * **** ** ***** ** * * * * ** * * * ** * * ******* * *** *** *
** ** *** ** ******* ***** ** * * *** *** * ** * * **** * *
* * * * ** * ** ***** ***** ** * **** *****

    }





}
answered by (-215 points)
0 like 0 dislike
Hidden content!
#include ******** **



#include *** * ** *







int main()



{


* *** ** * ** * *** ** *** ch, str[100];


* ** **** *** ** * * *** i, len;






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


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


***** * ****** * * ******* * * * ** * = strlen(str);


* *********** ** **** while(len < 3);


**** *** ** ******* * * * *** ** ** **** **** * ****** = getchar();


* ** * ***** ** ** * ** = 0; i <= len-3; i++)


* ** **** *** ** * * ** * ** ** * ** * * * ***** == ch && str[i+1] == ch && str[i+2] == ch)


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


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


** *** * ** ****** * ** ** ** ** * ** ***** **** **** ** * * * * * 0;


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


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


**** *** * * * * **** ** * 0;



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

#include <string.h>



int main()

{

    char remind[100][100]={'\0'};

    int date[100]={'\0'},sort[100],a,b,c,i,j,temp;


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

    {
* * ** * * *** * ** * ** * *** ******* * ** **** **** * * ****** ** **
**** * * * ** * *** *** ** ** * * *** = date[i];
* ****** *** * ** * * *** * * ** ** ** *
***** * ** * ** * ** * *** * **** **** ** ** ** **** * * ** ****
* * * * ******* ** * **** * ** *** ** *** * **** ** * ****
* * * * * * **** **** *** **** *** *** ** *
** ** *** **** *** * * * ** * ** * * *** * *** * *
* ** * * *** **** * * *** * ** ** ** *** * (date[i]>31 || date[i]<0){
* ** * ** * * ********* * * * * ** **** * **** * * ** * *
* * * ** ***** * * ***** *** ** *** ** * *



    }



    for (i=0; i<a-1; i++){
** ****** * * * ** * ** *** * * ** * j<=a-1; j++){
* * * * * ****** * *** * ****** **** ** **** ** ** ** ** **** * * * * (sort[j] <= sort[i]){
* * ** ** * ** * * * *** ********** ***** * ****** * ******* * * *** * * ** * ** ** ** ********* *
* * *** * ** *** * * * *** * * ** ** ** * ** ******* * * *** ** ** ** *** * *
*** *** * ** ** ** * * *** * * *** * ** ** ******* ** ** **** * ** * ***** * * ***
****** * ** **** ** ** ***** *** ** * * * ******** * * ** *
** * * * * ** * * * * *** **** *

    }

    printf("Day Reminder\n");
* * * * * * ** *** ** * ** * *
** **** ** * ** *** * *** *** * ** * **** * ***** * ** * *
***** **** ** * * * * ** * * * * ** ** * **** **** * * * * * * * ** ** * ** * * **
* * * ** ** *** * ***** **** * * * * * * * **** *** * * *
***** ** * ******** * * **** *** ** ** ******** * ** ** * * ** * ** *** ** **** * * **** * * ** ** **** * %2d%s\n",date[j],remind[j]);
** **** ** ** *** * * ** ***** ******* * **** ** ** ****** * *** ** *** **** * * ** * * ** * ** *** *
*** * ** * ***** * * * ** **** ***** * ****** *** *** * **** ** ** ** ** ** *** * ** *****
* * * * * * * ** ** * * * ** ** * ** * ** * * * * ** * ** * ***** * ** *
* * * *** *** *** ** * * * * ** * * **** * ***

    }





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

#include <string.h>

#include <stdlib.h>



int main(void)

{

    char reminder[60][60];

    char cday[3],cnote[60],temp[60];

    int day,i=0,j,k;
**** ** ** *** ** *

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


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

    }


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

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

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

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

    }

}
answered by (-324 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.159.115.10
©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.8k views
0 like 0 dislike
8 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24273 - Available when: Unlimited - Due to: Unlimited
| 2k views
0 like 0 dislike
13 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24269 - Available when: Unlimited - Due to: Unlimited
| 2.9k views
0 like 0 dislike
70 answers
[Exam] asked Apr 13, 2017 in Midterm
ID: 23789 - Available when: Unlimited - Due to: Unlimited
| 10.7k views
0 like 0 dislike
44 answers
[Exam] asked Apr 13, 2017 in Midterm
ID: 23785 - Available when: Unlimited - Due to: Unlimited
| 7.3k views
12,783 questions
183,442 answers
172,219 comments
4,824 users