C in Hindi if else programs ko kaise banaye

Hello Dosto aj ham C language ke statement if else ke programs ko kaise banaye iss bare me baat karege. ager apko C language ko Start se sikhna hai to aap meri C in Hindi Category me jaakar meri saari post padhe..  C language me If else statement ko conditional statement bhi kahte hai..

also read:- Data Type in C language in hindi

C in Hindi if else programs ko kaise banaye

C in Hindi: If Else Programming statement

As maine uper bataya ki isse conditional statement kahte hai. jab hamko C language me koi Conditions Ko apply karna hota hai to ham if else ka use karte hai. iss statement me if likh kar () lagaya jata hai aur fir (Condition) likhi jati hai. Yadi if me likhi condition true hoti hai Computer if ke baad likhe statement ko execute kar deta hai Aur Condition ke false hone per if ke statement se jump karke else ke statement me pahuch kar use execute kar deta hai.. isse is tarah likha jata hai. C in Hindi if else programs ko kaise banaye

if(condition)

{

=====

}
else

{

=====

}

also read:- C in Hindi Language Sample c Programs

also read:- Learn C Programming in Hindi language

inme condition ko apply karne ke liye in operators ki jarurat padti hai.

( > greater then, < less then, >= greater then or equal to, <= less then or equal to, == equal to, != not equal to)

C in hindi: if else Example programs in hindi

#include<stdio.h>

#include<conio.h>

main()

{int a,b;

clrscr();

printf(“Enter Value Of a=”);

scanf(“%d” ,&a);

printf(“Enter Value Of b=”);

scanf(“%d” ,&b);

if(a>b)

{

printf(“a Is Greatest”);

}

else

{
printf(“b Is Greatest);

}

getch();

}

Output-

If a=20 and b=25

then this program give us result b is greatest.

2. Program to find greates number among 3 numbers.

#include<stdio.h>

#include<conio.h>

main()

{int a,b,c;

clrscr();

printf(“Enter Value Of a=”);

scanf(“%d”,&a);

printf(“Enter Value Of b=”);

scanf(“%d”,&b);

printf(“Enter Value Of c=”);

scanf(“%d”,&c);

if(a>b)

{

if(a>c)

printf(“a Is Greatest);

else

printf(“c Is Greastest);

}

else

{

if(b>c)

printf(“b is Greatest”);

else 

printf(“c Is Greatest”);

}

getch();

}

C in hindi: Nested if statement

jab c programs me ek if statement ke ander ek aur if statement ka use kiya jata hai to isse nested if statement kaha jata hai. isko iss tarah likha jata hai.  C in Hindi if else programs ko kaise banaye

if(condition)

{

if(condition)

====

else

====

}

C in Hindi: ladder if statement

Normally in c programs if else statement me if ke false hone per else statement ko execute kiya jata hai. Per ager condition ke false hone per ham other options ko apply karna cahte hai to uske liye hame ladder if statement ka use karna padta hai. isko ham iss prakar likhte hai.

C in Hindi if else programs ko kaise banaye

if(condition)

{

====

}

else if(condition)

{

====

}

else if(condition)

{

====

}

else

{

====

}

is method se ham many conditions ko apply kar sakte hai.

Last Words

Friends apko meri yah post C in Hindi if else programs ko kaise banaye apko kaisi lagi aap comment karke bata sakte hai. aur apke man me koi question ho c in hindi ke bare me to jarur puche mujhe apke question ka answer dene me khusi hogi….

Comments

  1. Reply

    • By Shubham

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Show Buttons
Hide Buttons