Write an algorithm and draw flowchart to print first n even natural numbers and find their sum?
The MCS-011 course, "Problem Solving and Programming," is a core component of the IGNOU MCA program, focusing on foundational programming concepts and
In this blog post, we are covering another question of C which is asked in every university exams and this is very easy for students and sometime students find it very difficult to perform such questions in examination hall. But nothing to worry I have explained this question very well in this post.
Write an algorithm and draw flowchart to print first n even natural numbers and find their sum?
Sol. First, we will proceed with the algorithm for the same :
- Start
- Read the numbers from user and store it in a variable.
- Now, we will use for loop and inside the loop modulo operator will skip the odd numbers.
- All the even numbers will be added to another variable for ex : sum.
- Once the loop is over, print the value of sum.
- Stop
Our algorithm is ready, now we will proceed with the flowchart.
Our flowchart is also ready, so this is all you have to do in this question and for detailed explained tutorial, visit my YouTube Channel for more clarity. I am dropping the video link below :
Easy Engineering Concepts
Author & Editor
Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.
0 $type={blogger}:
Post a Comment