php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS101 Introduction to Computing Assignment No.2 Solution Spring Semester 2013
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#3
Question 1 Marks 10
Suppose you are a part of a software development team and you are asked to draw a flow chart of algorithm given below.
Algorithm’s Details:
The given algorithm is taking a number ‘n’ as input from user and print the sum of even and odd numbers from 1 to n. The algorithm scans from n to 1(or 1 to n). It checks whether the number is even or odd. If number is even, add that number in SUM_EVEN and if it is odd, then add it in SUM_ODD and decrement the value of n by 1.
Algorithm:
1. Start
2. Declare two variables and initialize them with 0( SUM_ODD=0, and SUM_EVEN=0)
3. Input “n”
4. Repeat while n>0
If(n%2==0)
SUM_EVEN=SUM_EVEN + n
else
SUM_ODD=SUM_ODD + n
n=n-1
5. Print SUM_EVEN and SUM_ODD
6. Stop

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Messages In This Thread
CS101 Introduction to Computing Assignment No.2 Solution Spring Semester 2013 - by Vuhelper - 12-12-2014, 05:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  CS508- Modern Programming Languages Assignment No. 03 Solution January 2016 Vuhelper 0 4,603 01-20-2016, 05:43 PM
Last Post: Vuhelper
  CS401 assignment no 3 Solution 20th January 2016 Vuhelper 0 10,297 01-20-2016, 05:15 PM
Last Post: Vuhelper
  Human Computer Interaction (CS408) Assignment no 3 20th January 2016 Vuhelper 0 1,112 01-20-2016, 05:13 PM
Last Post: Vuhelper
  ENG101 English Comprehension Assignment No.1 Solution Spring Semester 2013 Vuhelper 3 4,657 11-25-2014, 03:35 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Assignment No. 3 Solution Spring Semester June 2013 Vuhelper 1 4,118 06-24-2013, 10:39 PM
Last Post: Vuhelper
  MGT101 Financial Accounting Assignment 2 Solution Spring Semester June 2013 Vuhelper 0 3,117 06-15-2013, 11:57 PM
Last Post: Vuhelper
  ISL201 Islamic Studies Assignment No.1 Solution Spring Semester 2013 Vuhelper 0 4,599 05-17-2013, 09:33 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Assignment No.2 Solution Spring Semester 2013 Vuhelper 5 6,599 05-17-2013, 02:55 AM
Last Post: Xpert
  ENG201 Assignment No.2 Solution Spring Semester 2013 Vuhelper 1 5,788 05-16-2013, 04:41 PM
Last Post: Vuhelper
  ENG001 Elementary English Assignment No. 2 Solution Spring Semester 2013 Vuhelper 0 4,033 05-14-2013, 10:20 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support