Fri Jun 24 2022 13:17:21 GMT+0000 (Coordinated Universal Time)
Saved by @KanishqJ8
#include <stdio.h> // int sum(int n){ // for(int i=1; i<n; i++){ // return n+sum(n-i); // } // } int main(){ int num; printf("enter the number\n"); scanf("%d",&num); printf("%d",(num*num + num)/2); return 0; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments