#include <stdio.h>

int main() {
    int n;
    int U;
    int Un;
    int h=-1;
    int b;
    while (b!=0) {
        if (h++>0) {
            printf("  voulez vous une autre opération ? \n    1 pour oui et 0 pour non");
            scanf("%d\n",&b);
            if (b==0)
                return 0;
        }
        printf("  Quel entier voulez vous pour U0 et n ? \n");
        scanf("%d\n",&U);
        scanf("%d\n",&n);
        switch (n) {
            case 0:
                Un=U;
                break;
            case 1:
                Un=2*n+U;
                break;
            case 2:
                Un=5*n-U;
                break;
            default:
                Un=2*n*U;
                break;
        }
        
        
        printf("Un = %d\n",Un);
            
            
                
        
    
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: