Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Specifer



Test expression



Iterative statement



Header file



" ; " after loop




Summation of two number



// AHF C PROGRAM SOLVING

//solving here basic type of programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int m,n,sum=0; pf("Enter two integer number: "); scanf("%d %d",&m,&n); sum=m+n; pf("\nSummation of two number is : %d",sum); //if you want to add two floating point value, float p,q,add=0.0; pf("\nEnter two floating number: "); scanf("%f %f",&p,&q); add=p+q; pf("\nSummation of two floating number is : %f",add); return 0; }
OUTPUT:


© 2018 - All rights reserved