Daily Shop Sales

A local grocery shop owner wants to find the total sales amount for the week. You are given the daily sales figures for 7 days. Calculate and print the sum of all sales.

A local grocery shop owner wants to find the total sales amount for the week. You are given the daily sales figures for 7 days. Calculate and print the sum of all sales.

Input formatLink to this section

  • Line 1: Seven space-separated integers representing the daily sales amounts in Rupees

Output formatLink to this section

  • Line 1: The total sales amount as a single integer

ConstraintsLink to this section

  • 0 <= sales <= 100000

tip

Read the seven integers into an array and loop through them to add them up.

Rate this content

Sign in to rate

Discussion

Sign in to join the discussion