0 like 0 dislike
777 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"
[Normal] asked in Midterm by (12.1k points)
ID: 24271 - Available when: Unlimited - Due to: Unlimited

edited by | 777 views

6 Answers

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;



    for(i=0; i<100; i++)

    {
* * * *** * **** ** * **** * * * *** *** * ** * &date[i]);
* *** * ** * * * ** * *** * * * * * ** * * ***** ** *
** * ** * ** *** *** * ** * * * * ** (date[i]==0)
** * ** * * ** * ** ** ** * ** ******
** ** * * * ** ** ***** * *** * * ** ***** * * * * * *** *** * **** * **
** * * * ** * ** ** *** * ** * * * *** ** * *** *
** *** * * ** * * * * ** **** *** * * ** * ** **


* *** * ** * ** **** * **** *** **** ***
* ** ** *** * * **** ** *** * ** *** * * * * *** || date[i]<0)
** ** *** *** **** * * * * * * ** **** ****
***** *** *** * * **** * * ** * * ** **** ***** * ** *** *
* ** * ***** * * ** * * * * *** * **

    }



    for(i=0; i<a; i++)

    {
* *** **** ** ** ** * * *** * * * * * * j<=a; j++)
* ** * *** * * ** ** ** ** * * ** ** * ** ** **
****** * * * * ******* *** * * * *** * **** ***** ** * * * ** ** ***** **** * **
** * ****** *** ****** * * * ***** * ** *** * * *** * * * **
** * * * * * *** *** * * * ** * * ** * * * * ** ** ** *** ** * *** ***** * ** * ** ****** *** *
** * * ***** * * * ** * *** * ** * * * ** ****** ** * *** * *** * * * * * **** * *** ***
* * * * **** * ** *** * * * * * * *** ** *** ** * * *** * ******* ** * * ***** * **
* ******* * ** * * * ** ** ** * * * * ** *** * ** * * **** *****
* * * *** * * * ** *** ** * * ** * ** **

    }


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

    for(i=0; i<a; i++)

    {
*** * *** * * * * ** * ** * ** ** *** ** * j>0; j--)
* ** ** * **** ** * * * * ** * ** *** *
*** * ** *** * ** * * * * * ****** * * * *** * * *** * ** *** **** * *******
** * * ** ** * ** * ** ** ** * *** ***** * *** ** **** * * **
* * * * * * ** ** ** **** * ** * * * * * * *** ** * * ** * ** * * **** ** ** ** ***** * date[j], remind[j]);
** ** * * * * * * * ** * * * * ***** * *** *** **** * **** **** * *** **** ** ** **** ** ** * ***
** *** * * *** * * * *** ****** ** ** ** *** ** * * * * ** * * *** * ** ** * * ** * *
****** ** ***** ** * * *** ******** * ** * **** ** * ******* ** ********
* * ***** * * *** *** ***** ********

    }

}
answered by (-48 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;



    for(i=0; i<100; i++)

    {
* * ** *********** ** *** **** * ** ** * *** * * * * &date[i]);
** * ****** * * * * * ** * * *** * ******** ******** *** *
* ** ** * ** ** ** * ** *** * * ** * * ****** ** (date[i]==0)
** ***** ***** * ** **** ******* *** * ***
** ***** * * *** * ** * ** ******* ***** * ** * ** **** **
* * * ******* * * ** * * * ** * * ** ** * *** * ** * **** ** * *
** ***** *** * *** * * ******* *** * **


** * * *** *** *** * ** * *** ** * * ***** * *** ***
** *** ** * **** * * ** * * * ** * ** * ** ** * ***** **** || date[i]<0)
** * * ** ** ** ** *** ** * *** * ** ** *****
****** ** *** ** ** * **** ** ** * ** * * ***** **** *** * ** * *
* *** ***** * * ***** * ** ***** ** * *** * *

    }



    for(i=0; i<a; i++)

    {
**** * * * * ** ** ** ** * * ** ** **** * ** * * * j<=a; j++)
* ** * ***** * *** ** * ** *** * * * *** **
* * * *** * ** *** *** ** ****** ** ** ** * ********* * * *** * ** * *** ***
* * * * *** * *** * * * * *** *** * * ******* ** *** * * * *
*** * * * *** * ** ** ** ** ** ** * * **** * *** * * * * * * * **** ** * * **** * ***
* ** *** * * * ** ***** * ** * ** *** * ** **** ** * * ** *** *** * *** *
* *** *** * * *** **** * * ** * ** ** * ** ** * * * * *** ** *** ***** * * * ** * *
** ** ** ** * *** ** *** **** * ********* * * ** * *** * * ***
* **** ** **** * * ****** *** ** *** **

    }


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

    for(i=0; i<a; i++)

    {
**** * *** *** * ** ** *** *** *** *** * * * * j>0; j--)
** ** * * ** * * * ***** * * * * *** * *
* ** * ** ** **** *** *** **** * *** * * * * ** ** * * * ** ** ** * *** * ** *
** ** *** * * * * * ** ** ** * * ** ** *** ** **
* ****** ** *** ** ** *** * * * *** * ** * ** * **** * ** * **** * * * * **** * ********* ** ** *** date[j], remind[j]);
** **** * *** ** * * * * **** * * * * *** *** ** ** *** *** ** * ** **** * * * * ** * *
* **** * * ******* * * * **** * *** *** ***** *** *** * **** * * * * ***** * * ** **** * * * *
**** *** *** ** * ** ** * * *** ** **** * * ***** **
* ** *** ***** * * * ***** ** **

    }

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

#include <string.h>

#define MAX_SIZE 100



int main(void){

    char reminders[MAX_SIZE][MAX_SIZE]={'\0'};

    int date[MAX_SIZE]={'\0'},sort[MAX_SIZE],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],reminders[j]);
* * * ** * ****** ** * * * * * ***** * * ** * * * **** *** ** ** * **** *
* * *** * * * *** ** * ** ** * * ** * *** **** ** * * * ** ******* * * ** * ****
*** * * *** * ** ** *** * * ** **** *** * **** ** ** * *** *
*** * * * * * *** * * **** * ** * *

    }

    return 0;

}
answered by (20 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 (44 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.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 (44 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 (38 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.100.203
©2016-2025

Related questions

0 like 0 dislike
8 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24273 - Available when: Unlimited - Due to: Unlimited
| 922 views
0 like 0 dislike
13 answers
[Exam] asked Apr 21, 2017 in Midterm
ID: 24269 - Available when: Unlimited - Due to: Unlimited
| 1.3k views
0 like 0 dislike
46 answers
asked Apr 13, 2017 in Midterm by thopd (12.1k points) | 3.5k views
12,783 questions
183,442 answers
172,219 comments
4,824 users