تكفون ابي اعرف طريقة حل هالسؤال :
Write a program that inputs an integer, n, from the command line and
displays the string “1 + 2 + 3 + 4 + ... + n = sum.” For example, if the
command-line argument is 7, the output should be:
1 + 2 + 3 + 4 + 5 + 6 + 7 = 28
Make sure the number entered on the command line is positive.
وشكرا لكم