ShareCopy to ClipboardRawPreview#include<bits/stdc++.h> using namespace std; int main() { int n; cout << "Enter a number : "; cin >> n; cout << n*(n+1)/2; return 0; } sum00Ayush Gupta0 CommentsAdd CommentLog in to add a comment