Posts

Find the highest (maximum) and lowest (minimum) grades in an array of 25 integer grades. Print the array and print the highest and lowest grades, labeled appropriately

Task:  Find the highest (maximum) and lowest (minimum) grades in an array of 25 integer grades.  Print the array and print the highest and lowest grades, labeled appropriately. Try to enter all kind of integer grades in your array. Hits of integer grades: A+ is a Letter Grade. A is  a Letter Grade. 4 is an Integer Grade. 3.75 is an Integer Grade. So we may assume that 'A+' = 4, A = 3.75 etc. Source Code #include<stdio.h> #include<conio.h> void grade(float grades[],int size) { float min=0,max=0; int i; for(i=0;imax) { max=grades[i]; } } for(i=0;i<size;i++) { if(grades[i]<min) { min=grades[i]; } } printf("\n"); printf("Maximum Grade: %.2f",max); printf("\n"); printf("Minimum Grade: %.2f",min); } int main() { float grades[25],size; printf("Enter the size of an Array:\n"); scanf("%f",&size); printf("Enter the Grade point:\n"); grade(grades,size);

Write a C program to find the Simple Interest. Take input for principle amount, rate of interest and time from terminal

Simple Interest is the money paid by the borrower to the lender, based on the Principle Amount, Interest Rate and the Time Period. Simple Interest is calculated by, SI= P * T * R / 100 formula. Where, P is the Principle Amount. T is the Time Period. R is the Interest Rate. Definition of 'Simple Interest' from WEB A quick method of calculating the interest charge on a loan. Simple interest is determined by multiplying the interest rate by the principal by the number of periods. Simple Interest = P x I x N Where: P is the loan amount I is the interest rate N  is the duration of the loan, using number of periods Explanation of 'Simple Interest' Simple interest is called simple because it ignores the effects of compounding. The interest charge is always based on the original principal, so interest on interest is not included.  This method may be used to find the interest charge for short-term loans, where ignoring compounding is less of an iss

Write a program performing as calculator which allows all Arithmetic Operators with operands as input

1. Write a C program for performing as calculator which allows all Arithmetic Operators with operands from terminal. Few Input and Output sample are given below: Recommended : Study Char/Char Array in C/C++                                  Sample Input: 1 + 4             Sample Output: 5             Sample Input: 8 % 2             Sample Output: 0             Sample Input: 6 / 2             Sample Output: 3             Sample Input: 5 / 2             Sample Output: 2.5 Source code in c: #include<stdio.h> #include<conio.h> main() { int a,b,z,x,w,h; char c; float y,m=0.0; printf("\nWelcome To My Calculator\n"); AB: printf("\nenter to calculate (Ex:2+2)\n"); scanf("%d%c%d",&a,&c,&b); z=(a+b); x=(a*b); w=(a-b); h=(a%b); y=(a/b); m=y; switch(c) { case '+' : printf("%d+%d=%d",a,b,z); break; case '-' : printf("%d-%d=%d",a,b,w); break; ca