Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Working with switch case



Comment



Header file



Test expression



Specifer




Eligible age for vote



// AHF C PROGRAM SOLVING

//solving here basic type of programming problem

#include<stdio.h> #include<math.h> #define pf printf main() { int a; pf("Enter the age: "); scanf("%d",&a); if(a>=18) //checking eligibility { pf("\n\nYOU ARE ELIGIBLE FOR VOTED"); } else { pf("\n\nYOU ARE NOT ELIGIBLE FOR VOTED"); }

return 0; }
OUTPUT:


© 2018 - All rights reserved