In this page we have shared various types of c programs on various topics like loops,switch case,if-else statement,arrays,strings,pointer,functions,recursion etc.
This page consists of programs from basic c programs to high level c programs.
Search This Blog
Wednesday, June 26, 2019
Write a program in c to check whether a number is Even or Odd.
#include<stdio.h> int main() { int n; printf("Enter a number\n"); scanf("%d",&n); if(n%2==0) { printf("Even number"); } else { printf("Odd number"); } return 0; }
No comments:
Post a Comment