JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now

हिंदी माध्यम नोट्स

Categories: C Language in hindi

Decision Making Statements : Most Important Examples in hindi डिसीजन मेकिंग स्टेटमेंट

डिसीजन मेकिंग स्टेटमेंट Decision Making Statements : Most Important Examples in hindi in c computer language :-
C language के सबसे महत्वपूर्ण 8 प्रोग्राम को इस article मे लिखा गया है |सबसे पहले इन प्रोग्राम को खुद try करेगे |बाद में इसके solved code देखे|
1.find a number is even or not.
2.find a number is odd or not.
3.find a number is Armstrong or not.
4.find a number is prime or not.
5.find a simple interest.
6.find a area of circle from radius.
Answer :
Solution 1 : Code for find a number is even or not.
#include<conio.h>
#include<stdio.h>
void main ()
{
int num ;
printf(“Enter The Number”);
scanf(“%d”,&num);
if ((num/2)==0)
{
printf(“Number is Even .”);
}
printf(“Number is not Even.”);
getch();
}


Solution 2 : Code for find a number is odd or not.

#include<conio.h>
#include<stdio.h>
void main ()
{
int num ;
printf(“Enter The Number”);
scanf(“%d”,&num);
if ((num/2)!=0)
{
printf(“Number is odd.”);
}
printf(“Number is not odd.”);
getch();
}


Solution 3:Code for find a number is Armstrong or not.

#include<conio.h>
#include<stdio.h>
void main ()
{
int num,i,sum ;
printf(“Enter The Number”);
scanf(“%d”,&num);
int t=num;
for(i=num%10;num!=0;num=num/10)
{
    temp= i*i*i;
    sum=sum+temp;
}
if (t==sum)
{
printf(“Number is Armstrong.”);
}
else
{
printf(“Number is not Armstrong.”);
}
getch();
}

Code 4: code for find a number is prime or not.

#include<conio.h>
#include<stdio.h>
void main ()
{
int num,i ;
int j=0;
printf(“Enter The Number”);
scanf(“%d”,&num);
for(i=1;i<num;i++)
{
if (num%i==0)
{
j++;
}
}
if(j==2)
{
printf(“Number is prime number”);
}
else
{
printf(“Number is not prime number”);
}
}


Code 5: Find Simple Interest.

#include<conio.h>
#include<studio.h>
void main()
{
float SI;
int principal;
int rate;
int time;
printf(“Enter your principal”);
scanf(“%d”,&principal);
printf(“Enter your rate”);
scanf(“%d”,&rate);
printf(“Enter your time”);
scanf(“%d”,&time);
SI=(principal*rate*time)/100
printf(“Simple Interest=%f”,SI);
getch();
}

Code 6:Find area of circle.

#include<conio.h>
#include<studio.h>
#define pi 22.7
void main()
{
float area;
int r;
printf(“Enter your radius”);
scanf(“%d”,&r);
area=pi*r*r;
printf(“Area=%f”,area);
getch();
}
Sbistudy

Recent Posts

Question Tag Definition in english with examples upsc ssc ias state pcs exames important topic

Question Tag Definition • A question tag is a small question at the end of a…

2 weeks ago

Translation in english grammer in hindi examples Step of Translation (अनुवाद के चरण)

Translation 1. Step of Translation (अनुवाद के चरण) • मूल वाक्य का पता करना और उसकी…

2 weeks ago

Report Writing examples in english grammer How to Write Reports explain Exercise

Report Writing • How to Write Reports • Just as no definite rules can be laid down…

2 weeks ago

Letter writing ,types and their examples in english grammer upsc state pcs class 12 10th

Letter writing • Introduction • Letter writing is an intricate task as it demands meticulous attention, still…

2 weeks ago

विश्व के महाद्वीप की भौगोलिक विशेषताएँ continents of the world and their countries in hindi features

continents of the world and their countries in hindi features विश्व के महाद्वीप की भौगोलिक…

2 weeks ago

भारत के वन्य जीव राष्ट्रीय उद्यान list in hin hindi IAS UPSC

भारत के वन्य जीव भारत में जलवायु की दृष्टि से काफी विविधता पाई जाती है,…

2 weeks ago
All Rights ReservedView Non-AMP Version
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings
JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now