HomePython Write a python program to sum of the first n positive integers Vikram somai October 19, 2021 0 Comments Facebook Twitter code:-num = int(input("Input a number: ")) sum_num = (num * (num + 1)) / 2 print(sum_num) output:-Input a number: 1278.0>>> Tags Python Facebook Twitter
Post a Comment
If you have any doubts, Please let me know
Thanks!