Friday, February 1, 2019

Sum and Average

  • Problem Description

    Program to find sum, average of three numbers by getting input from user
  • CODING ARENA
  • a=int(input())
    b=int(input())
    c=int(input())
    m=a+b+c
    n=m/3
    print(m)
    print(round(n))
  • Test Case 1

    Input (stdin)
    10
    
    20
    
    45
    
    
    Expected Output
    75
    
    25
  • Test Case 2

    Input (stdin)
    100
    
    40
    
    10
    
    
    Expected Output
    150
    
    50

No comments:

Post a Comment