[ create a new paste ] login | about

Link: http://codepad.org:80/kuu9mz5V    [ raw code | fork ]

C, pasted on Oct 22:
#include <stdio.h>
int main () {
    int h,a,b,c,d,i,p;
    scanf("%h",&h); //quantas horas dura a reunião
    scanf("%a %b %c %d",&a,&b,&c,&d); //a,b | c,d (horas início - fim)
   
   while (i>9 && i<19) {   
          if (a<b && c<d) {
                 if (a==b) {
                         p=a+h; // hora inicial que ambos podem + h 
                         printf("%d %d\n",a,p);
                         }
                         
                 else if (c==d)
                               p=c-h; // hora inicial que ambos podem finalizar a reunião - h 
                               printf("%d %d\n",p,c);
                               }
          else printf("Impossivel\n");
          
          }
 
return 0;
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: