#include<stdio.h>
main()
{
int a,b;
float A,H;
printf("Enter a, b: ");
scanf("%d%d",&a,&b);
A = (a+b)*0.5;
printf("Arithmetic Mean = %f\n",A);
H = ((float)(a*b))/((float)(a+b));
printf("Harmonic Mean = %f\n",H);
}
This is more like an initiative to digitize the basic codes which are required to be executed while learning computer science, computer application, information technology and computer engineering at Indian universities. As I graduated from the University of Pune, the list of codes I am going to publish are the one which I learned and executed while studying at my graduation.
Thursday, 11 February 2021
Accept two numbers and print the arithmetic mean and harmonic mean
Subscribe to:
Posts (Atom)