Search
 
SCRIPT & CODE EXAMPLE
 

C

Uri/beecrowd problem no - 1131 solution in C

#include<stdio.h>
int main(){
    int limit = 1,counter = 0,counter1 = 0,counter2 = 0,counter3 = 0;
    while(limit != 2){
        if(limit == 1){
            int score1,score2;
            scanf("%d%d", &score1, &score2);
            if(score1 > score2){
                counter1++;
            }else{
                counter2++;
            }
            if(score1 == score2){
                counter3++;
            }
        }
        printf("Novo grenal (1-sim 2-nao)
");
        counter++;
        scanf("%d", &limit);
    }
    printf("%d grenais
", counter);
    printf("Inter:%d
", counter1);
    printf("Gremio:%d
", counter2);
    printf("Empates:%d
", counter3);
    if(counter1 > counter2){
        printf("Inter venceu mais
");
    }
    if(counter1 < counter2){
        printf("Gremio venceu mais
");
    }
    if(counter2 == counter1){
        printf("Não houve vencedor
");
    }
    return 0;
}
Comment

uri/beecrowd problem no - 1133 solution in C

#include<stdio.h>
int main(){
    int X,Y,i;
    
    scanf("%d%d", &X, &Y);
    
    if(X > Y){
        for(i = Y+1; i < X; i++){
            if(i % 5 == 2 || i % 5 == 3){
                printf("%d
", i);
            }
        }
    }else if(X < Y){
        for(i = X+1; i < Y; i++){
            if(i % 5 == 2 || i % 5 == 3){
                printf("%d
", i);
            }
        }
    }
    return 0;
}
Comment

Uri/Beecrowd problem no - 1149 solution in C

#include<stdio.h>
int main(){
    int A,N,sum = 0,i;
    scanf("%d%d", &A, &N);
    while(N < 0 || N == 0){
        scanf("%d", &N);
    }
    for(i = 0; i < N; i++){
        sum = sum + A + i;
    }
    printf("%d
", sum);
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: #pragma pack(1) in c 
C :: command line arguments to copy paste in c 
C :: online c compiler for graphics 
C :: Handling exceptions during datetime conversion 
C :: Integer Xor swap 
C :: link a lib iusing pragma 
C :: c "hello world" 
C :: Reverse every Word of given String 
C :: Implement N-Queen Problem 
C :: peripheral bus clock pic32 
C :: c joystick arduino 
C :: analog clock c code for turbo 
C :: manasa loves maths solution IN C 
C :: Print fabionci with fork in C 
C :: Wait until an animation finishes - Selenium, Java 
C :: FivemStore 
C :: sdl close ev 
C :: not repeated serial number in c 
C :: c declare float 
C :: C Increment and Decrement Operators 
C :: Recommended compiler and linker flags for GCC 
Dart :: dart regex for email 
Dart :: rel canonical tag 
Dart :: flutter copy to clipboard 
Dart :: dart timestamp 
Dart :: flutter showsnackbar 
Dart :: mark as deprecated dart 
Dart :: flutter file size 
Dart :: flutter text button 
Dart :: flutter flotingactionbutton with text 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =