Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Working with switch case



Test expression



Specifer



" ; " after loop



Comment




Function_ find if triangle or not




// AHF C PROGRAM SOLVING

//The problem are solving here using FUNCTION

#include<stdio.h> #include<math.h> #define pf printf //function declaration int fact(int x, int y, int z); void main() { int a,b,c,res; printf("Enter three numbers: "); scanf("%d %d %d",&a,&b,&c); //function call res=fact(a,b,c); //printing output taking value from function body if(res==1) printf("\nThis is a try angle."); else if(res==2) printf("\nThis is a try angle."); else if(res==3) printf("\nThis is a try angle."); else printf("\nThis is not a try angle."); return 0; }
OUTPUT:


© 2018 - All rights reserved