Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Comment



Working with switch case



" ; " after loop



Specifer



Test expression




Input any number and find color name



// AHF C PROGRAM SOLVING

//solving here basic type of programming problem

#include<stdio.h> #define pf printf int main() { int a; float temp; pf("Enter any number: "); scanf("%d",&a); temp=a%4; if(temp==1) pf("READ PAINT."); else if(temp==2) pf("GREEN PAINT."); else if(temp==3) pf("BLUE PAINT."); else pf("YELLOW PAINT."); return 0; }
OUTPUT:


© 2018 - All rights reserved