Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Test expression



Specifer



Comment



" ; " after loop



Working with switch case




Solve simple formula solution



// AHF C PROGRAM SOLVING

//solving here basic type of programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int m,v,solve1,solve2; float r,s; pf("\nEnter the value of r, m, v: "); scanf("%f %d %d",&r,&m,&v); solve1=pow(r,2)-pow(m,2); solve2=pow(r,3)+pow(v,3); s=4/3*3.14*pow(r,3); pf("\nThe value of r2 - m2 : %f",solve1); pf("\nThe value of r3 - v3 : %f",solve2); pf("\nThe value of 4/3*3.1416*r3= %d",s); return 0; }
OUTPUT:


© 2018 - All rights reserved