Simple C++ Programs For Beginners In Hindi :
Simple C++ Programs For Beginners In Hindi
आज हम Beginners के लिए 6 ऐसे छोटे – छोटे Programs लाये हैं जिन्हें आप खुद Practices कर आसानी से सीख सकते हैं । अगर आप C या C++ में Programming की शुरुवात कैसे करते हैं। इसके बारे में पढ़ना चाहते हैं तो आप “C++ क्या हैं और इसमें पहला Program कैसे बनाते हैं” अवश्य पढ़ें।
Note-
इसी Post से संबंधित “Two Simple C Programs For Beginners” , Video को हमारे YouTube channel में देखने के लिए इस Link में Click करें । YouTube channel link – (Padhai Ki Batein / पढाई की बातें)
Example 1.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr() ;
int a , b , c , d , e , f;
cout <<“Enter the value for A number = ” ;
cin>>a ;
cout <<“Enter the value for B number = ” ;
cin>>b ;
c=a+b ;
d=a-b;
e=a/b ;
f=a*b;
cout<<“Sum of (A+B) is = “<<c<<“\n” ;
cout<<“Subtraction of (A-B) is = “<<d<<“\n” ;
cout<<“Division of (A/B) is = “<<e<<“\n” ;
cout<<“Multiplication of (A*B) is = “<<f<<“\n” ;
getch();
}
Example 2.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr() ;
char pn[10];
int q , pr , sr , tpr , tsr , p ;
cout <<“ Sales Report ”<<“\n” ;
cout <<“Enter The Product Name = ” ;
cin>>pn;
cout <<“Enter the Product Quantity = ” ;
cin>>q;
cout <<“Enter the Product Purchases Price = ” ;
cin>>pr;
cout <<“Enter the Product Sales Price = ” ;
cin>>sr;
tpr=q*pr ;
tsr=q*sr
p=tsr-tpr
clrscr() ;
cout <<“ Sales Report ”<<“\n” ;
cout<<“ Product Name = “<<pn ;
cout<<“ Quantity = “<<q ;
cout<<“ Purchases Rate = “<<pr ;
cout<<“ Sales Rate = “<<sr ;
cout<<“ Total Purchases Amount = “<<tpr ;
cout<<“ Total Sales Amount = “<<tsr ;
cout<<“ Total Profit = “<<p ;
getch();
}
Example 3.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr() ;
char sn [10];
int h , e , m , s , t , a ;
cout <<“Enter Student’s Name = ” ;
cin>>sn;
cout <<“Hindi Marks = ” ;
cin>>h ;
cout <<“English Marks = ” ;
cin>>e ;
cout <<“Maths Marks = ” ;
cin>>m ;
cout <<“Science Marks = ” ;
cin>> s ;
t=h+e+m+s ;
a=t/4;
clrscr() ;
cout <<“ Marks Sheet”<<“\n” ;
cout<<“Marks in Hindi = “<<h <<“\n”;
cout<<“Marks in Science = “<<s<<“\n” ;
cout<<“Marks in Maths = “<<m<<“\n” ;
cout<<“Marks in English = “<<e<<“\n” ;
cout<<“Total Marks = “<<t<<“\n” ;
cout<<“Percentage = “<<a<<“\n” ;
getch();
}
Example 4.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr() ;
int b , t , h , h1 , d, g , i , p , t ;
cout <<“Salary Sheet ”<<“\n” ;
cout <<“Enter the Basic Salary ” ;
cin>>b ;
cout <<“Enter the Travelling Allowances ” ;
cin>>t ;
cout <<“Enter the House Rent “;
cin>>h ;
cout <<“Enter Da “;
cin>>d ;
cout <<“Enter the Hill Allowances “;
cin>>h1 ;
cout <<“Enter the Provident Fund “;
cin>>p ;
cout <<“Enter Income Tax amount “;
cin>>i ;
g=b+t+h+d+H1 ;
t=g-(p+i) ;
clrscr() ;
cout<<” Salary Sheet “<<“\n” ;
cout<<“Basic Salary is = “<<b<<“\n” ;
cout<<“Travelling Allowances is = “<<t<<“\n” ;
cout<<“DA is = “<<d<<“\n” ;
cout<<“House Rent is = “<<h<<“\n” ;
cout<<“Hill Allowances is = “<<h1<<“\n” ;
cout<<“Gross Salary is = “<<g<<“\n” ;
cout<<“Total Salary is = “<<t<<“\n” ;
getch();
}
Simple C++ Programs For Beginners In Hindi
Example 5.
किसी भी Variable को float Type Define करने से उसमें दशमलव यानि Decimal Value Store की जा सकती हैं। और “\t” को एक Tap Space जगह का gap देने के लिए Use किया जाता हैं।
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr() ;
int a = 10 ;
float b = 4.5 ;
cout <<“value of A is = ”<<a<<“\t” <<“value of b is = “<<b ;
getch();
}
Example 6.
किसी भी Variable की Value को Temporary दूसरे Variable में Transfer किया जा सकता हैं।
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr() ;
int a = 10 ;
int b=20 ; int c ;
c=a ; (यहाँ पर a की value यानि 10 , Variable c में Temporary Transfer हो जायेगी )
a=b ; (यहाँ पर b की value यानि 20 , Variable a में Temporary Transfer हो जायेगी )
cout <<“value of a is = ”<<a<<“\t” <<“value of c is = “<<c;
getch();
}
OUTPUT – 20 10
Simple C++ Programs For Beginners In Hindi
इसी Post से संबंधित “First C Program With Simple Example” , Video को हमारे YouTube channel में देखने के लिए इस Link में Click करें । YouTube channel link – (Padhai Ki Batein / पढाई की बातें)
NOTE – Class 8th , 9th , 10th , 11th , 12th के हिन्दी विषय के सभी Chapters से संबंधित videos हमारे YouTube channel (Padhai Ki Batein / पढाई की बातें) पर भी उपलब्ध हैं। कृपया एक बार अवश्य हमारे YouTube channel पर visit करें । सहयोग के लिए आपका बहुत – बहुत धन्यबाद।
You are most welcome to share your comments . If you like this post . Then please share it . Thanks for Reading.
यह भी पढ़ें…
- C++ क्या हैं और C++ में First Programming कैसे बनाते हैं ?
- 6 Simple C++ Program For Beginners
- If Else Statement In C++
- What is HTML Coding
- Web Page कैसे बनाते हैं
- HTML Form
- How To Create Table In Html
- How To Create Hyperlink In HTML
- How To Insert An Image In HTML Page
- Ordered And Unordered List In HTML
- Frame In HTML Coding
- Add Background Color And Image
- Map in HTML
- Nested List In HTML
- Nested Table In HTML