Search
 
SCRIPT & CODE EXAMPLE
 

C

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

Uri/Beecrowd problem no - 1150 solution in Java

import java.util.Scanner;

public class Main{
    public static void main (String[] args) {
        Scanner obj = new Scanner(System.in);
        int X,Z,counter = 1,c = 0,i;
        X = obj.nextInt();
        Z = obj.nextInt();
        
        while(Z <= X){
            Z = obj.nextInt();
            for (i = X; i <= Z; i++){
                c += i;
                if(c > Z){
                    break;
                }else{
                    counter++;
                }
            }
        }
        System.out.println(counter);
    }
}
Comment

Uri/Beecrowd problem no - 1151 solution in C

#include<stdio.h>
int main(){
    int N,i,n[100];
    scanf("%d", &N);
    
    n[0] = 0;
    n[1] = 1;
    
    for(i = 2; i < N; i++){
        n[i] = n[i-1] + n[i-2];
    }
    printf("0");
    for(i = 1; i < N; i++){
        printf(" %d", n[i]);
    }
    printf("
");
    return 0;
}
Comment

Uri/Beecrowd Problem no - 1184 solution in C

#include<stdio.h>
int main(){
    double M[12][12],sum = 0;
    int i,j,counter = 1;
    char O[2];
    scanf("%s", O);
    
    for(i = 0; i < 12; i++){
        for(j = 0; j < 12; j++){
            scanf("%lf", &M[i][j]);
        }
    }
    for(i = counter; i < 12; i++){
        for(j = 0; j < counter; j++){
            sum += M[i][j];
        }
        counter++;
    }
    if(O[0] == 'S'){
        printf("%.1lf
", sum);
    }else if(O[0] == 'M'){
        printf("%.1lf
", sum / 66.0);
    }
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: typecating in c 
C :: c enums 
C :: convert c to python online 
C :: libreoffice reference cell in different sheet with sheet name with space 
C :: can we update values of a map via traversing 
C :: C if...else Statement 
C :: false and true in c 
C :: java Node<E 
C :: c stack 
C :: c disable struct padding 
C :: UTC offset upper limit 
C :: when to add & in snacf c 
C :: C Why enums are used? 
C :: increment c 
C :: bash sed crop cut file line number 
C :: nc,manc 
C :: search and then change string -- strstr and strcpy 
C :: how to compress image in c 
C :: The closest in between 
C :: wordpress clean name spaces 
C :: split string at space C 
C :: c code to algorithm converter online 
C :: mongodb delete all documents 
Dart :: flutter statusbar height 
Dart :: dart datetime parse 
Dart :: showdialog with builder flutter 
Dart :: flutter clear all text in textfield 
Dart :: refresh indicator flutter 
Dart :: how to repeatedly call a function flutter 
Dart :: leading image flutter 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =