Check Whether the Entered Number is Even or Odd Programming

C – Check Whether the Entered Number is Even or Odd

  • April 23, 2021
  • 0 Comments

Write a program to check whether the entered number is even or odd. C Code #include <stdio.h>#include <conio.h>void main(){ int number; printf(“enter number : n”); scanf(“%d”,&number); if(number%2==0) printf(“%d is even numbern”,number); else printf(“%d is odd numbern”, number); getch();} Output

Programming

C – Take Integer Input and Display Appropriate Alphabets using Switch Case

  • April 23, 2021
  • 0 Comments

Write a program to take an integer as an input which will be the value of alphabets up to 26 alphabets using switch case. C Code  #include <stdio.h>#include <conio.h>void main(){ int alphabets; ABC:printf(“nEnter the value of alphabets:”); scanf(“%d”,&alphabets); printf(“nThe alphabet is : “); switch (alphabets){ case 1: printf(“A”); break; case 2: printf(“B”); break; case 3: […]