Skip to main content
To Get All Information of Sarkari Jobs | Results | Admit Card | And courses ,Internships then CLICK HERE

if-Statement-:


The if statement is simplest form of decision control statement i.e. frequently used in decision making.The syntax of if statement is as follow-:
syntax-:if(condition)
               statement;
or
if(condition)
{statement-1;
  statement-2;
  statement-3;
   -
   -
   -
   statement-n;
}
From above syntax if the condition is TRUE,then the statement will execute or a block of statement-1 to statement-n will execute.
ads

Example-:
#include<stdio.h>
#include<conio.h>
main()
{int num=0;
  printf("Enter The Value of num");
  scanf("%d",&num);
  if(num%2==0)
  printf("\n %d is an  Even Number",num);
  getch();
}
output-:Enter The Value of num 30
              30 is an Even Number
ads Watch The Video Below


Comments

Post a Comment

Please do not enter any spam link in the comment box.


Download The Book "Let Us C" By Yashavant P.Kanetkar,Click The Below Button

-->Email Subscription

Enter Your Email Address:-

Delivered by FeedBurner

Copyright © 2020 TechProgramiz|All Right Reserved|Made By-: Sudarshan Pandey