Hello, Visitor.
Security Problem Issued.
This is handsome company base camp, and would be seen by an authorized person.
"여고생프로그래밍경진대회 테스트코드"
#include <stdio.h>

    int sum(int n) {
        if ( n >= 0 ) {
            return n+sum(n-1);
        }
        return 0;
    }
    
    int main() {
        int N=0;
        N = 10;
        scanf("%d", &N);
        printf("%d",sum(N));
        return 0;
    }
    
#include<iostream> 
using namespace std; 
int sum(int n); 

int main() { 
int number; 
number = 10;
cout << "n = "; 
cin >> number; 
cout << "sum = " << sum(number) << endl; 
return 0; 
} 
int sum(int n) {
 if(n<=0) return 0;
 return n + sum(n-1); 
}
import java.util.Scanner;
 
    public static void method(int m){
        int sum =0;
        for(int i=1;i<=m;i++){
            sum+=i;
        }
        System.out.println(sum);
    }


public class Main{
    public static void main(String[] args){
        //Scanner sc = new Scanner(System.in);
        //int n = sc.nextInt();
        int n=55;
        method(n);
    }
}
p0.c
p0.cpp
p0.java