S2-C-Programs

All major conceptual S2 C-Programs with Algorithms

View the Project on GitHub trulyPranav/S2-C-Programs

Code:

#include<stdio.h>

void main(){
    int num;
    printf("Enter a number:");
    scanf("%d",&num);
    if(num%2==0){
      printf("%d is Even",num);
    }
    else{
      printf("%d is Odd",num);
    }
}

Algorithm:

Step 1: Start

Step 2: Read a number & Store it in variable num.

Step 3: if num%2==0

else

Step 4: Stop