/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.c * Author: tym7 * * Created on October 20, 2018, 10:33 AM */ #include #include #include /* * */ int main(int argc, char** argv) { char dice[10]; int err =0; err = scanf("%c%c%c",dice,dice+1,dice+2); err = scanf(" %c%c%c",dice+3,dice+4,dice+5); err = scanf(" %c%c%c",dice+6,dice+7,dice+8); dice[10]='/0'; /* switch(dice){ case "::::o::::": printf("kokdobry"); break; } */ if(strcmp("::::o::::",dice)==0){ printf("1"); }else if((strcmp("o:::::::o",dice)==0) || strcmp("::o:::o::",dice)==0){ printf("2"); }else if((strcmp("o:::o:::o",dice)==0) || strcmp("::o:o:o::",dice)==0){ printf("3"); }else if(strcmp("o:o:::o:o",dice)==0){ printf("4"); }else if(strcmp("o:o:o:o:o",dice)==0){ printf("5"); }else if((strcmp("o:oo:oo:o",dice)==0)||(strcmp("ooo:::ooo",dice)==0)){ printf("6"); }else printf("unknown\n"); //printf("kok"); return (EXIT_SUCCESS); }