Full course of c++ programming language Click here > C++ programming language ===================================== 1. Write a program to display an average of 3 inputted numbers. a=int(input("Enter a : ")) b=int(input("Enter a : ")) c=int(input("Enter a : ")) avg=(a+b+c)/3 print(avg) ====================================== 2. Write a program to calculate simple interest for a given principle amount, rate of interest and no of years. p=float(input("Enter a P : ")) r=float(input("Enter a R : ")) n=float(input("Enter a N : ")) si=(p*r*n)/100 print("simple interest is ",si) ====================================== 3. Write a program to display area of triangle. base=float(input("Enter a base : ")) height=float(input("Enter a height : ")) area=base*height/2 print("Area of triangle is ",area) ====================================== 4. Write a program to calculate area of circle. r=float(input...
Comments
Post a Comment