C Program To Calculate The Revenue The demand for organic food increases every year by 8.9%. Write a program to find the increase in revenue after 3 years. Given the revenue in the first year is ‘x’ crores. Input Format: The first line of the input is an integer that corresponds to the ‘x’ value. Output Format: Output is a float value that corresponds to the revenue after 3 years, rounded off to 2 decimal places. Sample Input: 4 Sample Output: 5.17 //PROGRAM #include<stdio.h> int main() { int x,i; float rev; scanf("%d",&x); rev=x; for(i=0;i<3;i++) { rev=rev*(1.089); } printf("%.2f",rev); return 0; }
Comments
Post a Comment