Horje
Uri/beecrowd problem no - 1099 solution in C Code Example
Uri/beecrowd problem no - 1099 solution in C
#include<stdio.h>
int main(){
    int N,X,Y,i,j,sum = 0;
    scanf("%d", &N);
    
    for(i = 1; i <= N; i++){
        scanf("%d%d", &X, &Y);
        if(X > Y){
            for(j = Y+1,sum = 0; j < X; j++){
                if(j % 2 != 0){
                    sum += j;
                }
            }
        }else if(X <= Y){
            for(j = X+1,sum = 0; j < Y; j++){
                if(j % 2 != 0){
                    sum += j;
                }
            }
        }
        printf("%d\n", sum);
    }
    return 0;
}




C

Related
c how to include variables of other c file Code Example c how to include variables of other c file Code Example
e sharm card jobkhozo.com Code Example e sharm card jobkhozo.com Code Example
3.Write a program that has a class student that stores roll number, name, and marks (in three subjects) of the students. Display the information (roll number, name, and total marks) stored ab 3.Write a program that has a class student that stores roll number, name, and marks (in three subjects) of the students. Display the information (roll number, name, and total marks) stored ab
ecto where is not nil Code Example ecto where is not nil Code Example
increment pointer value in c Code Example increment pointer value in c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8