7 solutions

  • 0
    @ 2024-10-21 15:37:57

    #include <stdio.h> int main() { int result, x, y;

    scanf_s("%d",&x);
    for (result = 0, y = 1; y <= x; y++)
    {
    	result = result + y;
    
    
    };
    
    printf("%d",result);
    return 0;
    

    }

    Information

    ID
    34
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    # Submissions
    2839
    Accepted
    413
    Uploaded By