Qaafiyah Expert 2.0

Write More. Search Better. Create Beautifully.

A complete poetry companion for Urdu, Hindi, Persian & Hindustani poetry — now built for a multilingual audience.

Urdu · Hindi · Roman · Devanagari   •   Qaafiya & Wazn   •   Taqti & Aruz

Saturday, 18 March 2017

Programming Challenge #1: Add Up To Second Number


Hello programmers. I am starting a series of programming challenges for beginners here. I'll post the problems with some explanation, screenshot of the final output and a little bit of hint if it is really needed. Solve your problems using any programming language you are comfortable with.

Here goes the first problem.

Programming Challenge #1: Add Up To Second Number

Details: Write a program which asks users to input two numbers. Your task is to add all the consecutive numbers from first number to second.
Example: 
Input 1: 1
Input 2: 10
Answer: 55

Additional Task(optional): Show the numbers being add. 

Final Output Screenshot:

Shakeeb Ahmad Maharashtra, India

Shakeeb Ahmad is a blogger, poet, enthusiast programmer, student of comparative religion and psychology, public speaker, singer and Vedic Maths expert. He loves playing with the numbers and invented a shortcut method to square the numbers at the age of 16. In sports, football is root to his happiness. He lives it.