Algorithm
नमस्कार दोस्तों अगर आप Programming language सीखना चाहते है तो आपको Algorithm के बारे मे जानना जरूरी है क्योंकि यह किसी भी प्रोग्राम का Base होता है तो चलिए शुरू करते है ।
Algorithm क्या हाता है ? (What is algorithm ) in hindi
किसी प्रोग्राम ( समस्या ) के समाधान को Solve करने के लिए एक logical sequence होता है। किसी प्रोग्राम को लिखने से पहले एक Algorithm बनाते हैं ताकि जो प्रोग्राम बना रहे हैं वह सही Design किया जा सके ।
दूसरे शब्दों में- " किसी भी Problem को Solve करने के लिए Step by Step लिखे गए instruction (process) को Algorithm कहते है । "
Algorithm is a logical sequence to solve a problem of any program .
In other words- Algorithm is a step by step process to solve any problem .
Examples of algorithm :-
To find greater value between two numbers.
Step 1. Start
Step 2. Read a,b
Step 3. If a>b then
write " a is greater"
else
write " b is Greater"
Step 4. End
Write a algorithm to check whether given number is odd or even .
Step -1 Start
Step -2 Read value of num
Step -3 if num %2 == 0 then ,
print - number is even
else
print - number is odd
Step -4 Stop
Write a algorithm to print the factorial of the given number .
Step - 1 Start
Step - 2 Read value of num
Step - 3 intialize f=1, i=1
Step - 4 Repeat step 5 and 6 while i<= n
Step - 5 f = f * i
Step - 6 i= i+1 or i++
Step - 7 print - value of f
Step - 8 Stop
अगर यह पोस्ट आपको अच्छी लगी है तो आप अपने दोस्तो के साथ भी Share जरूर करेंगे । Your Queries :-
O level July 2020, what is algorithm in c language, what is algorithm in computer science, what is algorithm in c programming in hindi, what is algorithm in c language in hindi, what is algorithm in c in hindi, C programming introduction tutorial, C programing tutorial 2 in hindi
0 Comments
Hey, What do you think about this post