Computer Programming Contest Preparation

ToolBox - Source for: 111/11172/a.c



/home/toolbox/public_html/solutions/111/11172/a.c
    1 #include <stdio.h>
    2 #include <string.h>
    3 #include <sys/types.h>
    4 #include <sys/stat.h>
    5 #include <fcntl.h>
    6 #include <stdlib.h>
    7 #include <math.h>
    8 #include <stdint.h>
    9 
   10 #define TRUE  (1 == 1)
   11 #define FALSE (1 != 1)
   12 
   13 #define DEBUG if (FALSE)
   14 
   15 /* fprintf(stderr, "functionName: message", varslist); */
   16 
   17 /*
   18  *  Author: Isaac Traxler
   19  *    Date: 2014-10-28
   20  * Purpose: fun
   21  * Problem: Relational Operators
   22  */
   23 
   24 /*
   25  * This template reads data a specified number of times.
   26  */
   27 
   28 int numberOfTimes;
   29 int a;
   30 int b;
   31 
   32 void init()
   33 {
   34     /* FUNCTION init */
   35     scanf("%d ", &numberOfTimes);
   36 } /* FUNCTION init */
   37 
   38 void dump()
   39 {
   40     /* FUNCTION dump */
   41 } /* FUNCTION dump */
   42 
   43 void getInput()
   44 {
   45     /* FUNCTION getInput */
   46     scanf(" %d %d ", &a, &b);
   47 } /* FUNCTION getInput */
   48 
   49 void process()
   50 {
   51     /* FUNCTION process */
   52     if (a > b)
   53         {
   54             printf(">\n");
   55         }
   56     if (a == b)
   57         {
   58             printf("=\n");
   59         }
   60     if (a < b)
   61         {
   62             printf("<\n");
   63         }
   64 } /* FUNCTION process */
   65 
   66 int main ()
   67 {
   68     /* main */
   69     int i;
   70 
   71     init();
   72     for (i=0; i<numberOfTimes; i++)
   73         {
   74             /* while */
   75             getInput();
   76             process();
   77         } /* while */
   78 
   79     return EXIT_SUCCESS;
   80 } /* main */
   81 
   82