#include <stdio.h>
int main()
{
    char opt;
    int n1, n2;
    int res1;
    float res;
    printf ("podaj liczbe nr 1:");
    if (scanf("%d", &n1) != 1)
    {
        printf("Incorrect input");
        return 1;
    }
    printf ("podaj liczbe nr 2:");
    if (scanf("%d", &n2) != 1)
    {
        printf("Incorrect input");
        return 1;
    }
    printf ("podaj wazny operator( + , * , - , / ):");
    scanf (" %c", &opt);
    if (opt == '+')
    {
        res1 = n1 + n2;
        printf ("wynik = %d",res1);
    }

    else if (opt == '-')
    {
        res1 = n1 - n2;
        printf ("wynik = %d",res1);
    }

    else if (opt == '*')
    {
        res1 = n1 * n2;
        printf ("wynik = %d",res1);
    }

    else if (opt == '/')
    {
        if  (n2 == 0)
        {
            printf("Operation not permitted");
            return 2;
        }
        else
        {
            res = n1/n2;
            printf("wynik = %.2f\n",res);
        }
    }
    return 0;
}
