हिंदी माध्यम नोट्स
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 ;
int num ;
printf(“Enter The Number”);
scanf(“%d”,&num);
if ((num/2)==0)
{
printf(“Number is Even .”);
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 ;
int num ;
printf(“Enter The Number”);
scanf(“%d”,&num);
if ((num/2)!=0)
{
printf(“Number is odd.”);
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 ;
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.”);
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 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;
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;
float area;
int r;
printf(“Enter your radius”);
scanf(“%d”,&r);
area=pi*r*r;
printf(“Area=%f”,area);
getch();
}
Recent Posts
सती रासो किसकी रचना है , sati raso ke rachnakar kaun hai in hindi , सती रासो के लेखक कौन है
सती रासो के लेखक कौन है सती रासो किसकी रचना है , sati raso ke…
24 hours ago
मारवाड़ रा परगना री विगत किसकी रचना है , marwar ra pargana ri vigat ke lekhak kaun the
marwar ra pargana ri vigat ke lekhak kaun the मारवाड़ रा परगना री विगत किसकी…
1 day ago
राजस्थान के इतिहास के पुरातात्विक स्रोतों की विवेचना कीजिए sources of rajasthan history in hindi
sources of rajasthan history in hindi राजस्थान के इतिहास के पुरातात्विक स्रोतों की विवेचना कीजिए…
3 days ago
गुर्जरात्रा प्रदेश राजस्थान कौनसा है , किसे कहते है ? gurjaratra pradesh in rajasthan in hindi
gurjaratra pradesh in rajasthan in hindi गुर्जरात्रा प्रदेश राजस्थान कौनसा है , किसे कहते है…
3 days ago
Weston Standard Cell in hindi वेस्टन मानक सेल क्या है इससे सेल विभव (वि.वा.बल) का मापन
वेस्टन मानक सेल क्या है इससे सेल विभव (वि.वा.बल) का मापन Weston Standard Cell in…
3 months ago
polity notes pdf in hindi for upsc prelims and mains exam , SSC , RAS political science hindi medium handwritten
get all types and chapters polity notes pdf in hindi for upsc , SSC ,…
3 months ago