Saturday, July 15, 2017

URI problem 1930 solution in C | (Electrical Outlet)

#include<stdio.h>
int main()
{
    int a,b,c,d,e;
    while(scanf("%d",&a)!=EOF){
        scanf("%d %d %d",&b, &c, &d);
        e=a+b+c+d;
        printf("%d\n",e-3);
    }
    return 0;
}

No comments:

Post a Comment