Computer Science, asked by krishnajee94714, 10 months ago

1. Write a program to take year as input and check if it is leap year or not.
2. WAP to calculate the amount payable after sales discount, which is 10% upto the sales amount of 20000 and 17.5% on amounts above that.
3.WAP to Calculate Compound intrest.
4. WAP to Check Number is Divisible by 5

Answers

Answered by bibliophilermumukshu
0

1) year=int(input("Enter year to be checked:")) if(year%4==0 and year%100!= 0 or year%400==0): print("The year is a leap year!) else: print("The year isn't a leap year!)

2)sales_amount=int(input("Enter sales amount:"))

if(sales_amount<=20000):

discount=(10/100)*sales_amount

print(f"Discount(10%):{discount}")

else:

discount=(17.5/100)*sales_amount

print(f"Discount(17.5%):{discount}")

sales_amount=sales_amount-discount

print(f"Sales amount(without tax):{sales_amount}")

sales_taxp=int(input("Enter sales tax%:"))

sales_amount+=(sales_taxp/100)*sales_amount

print(f"Sales amount(with tax):{sales_amount}

3)Skip to content

Search for:

C program to calculate Compound Interest

May 13, 2015PankajC programmingBasic, C, Program

Write a C program to input principle (amount), time and rate (P, T, R) and find Compound Interest. How to calculate compound interest in C programming. Logic to calculate compound interest in C program.

3) Example

Input

Enter principle (amount): 1200

Enter time: 2

Enter rate: 5.4

Output

Compound Interest = 1333.099243

4) Write a C program to check whether a number is divisible by 5 and 11 or not using if else. How to check divisibility of any number in C programming. C program to enter any number and check whether it is divisible by 5 and 11 or not. Logic to check divisibility of a number in C program.

#bebrainly

#mumukshu

Similar questions