We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS201 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019

Programming is a nice tool which can be used to make our life easier. With the help of programming we can do many things auto generated and efficiency. As a programmer first task of this semester is given to you is develop a console-based application for school teachers. This application will auto generate questions for Grades 1, 2, 3, 4 and 5. Using this application teacher will be able to give different paper to each student.

 

Assignment Statement:

Write a menu-based program in C++ that will take input from user(teacher) and fulfill following requirements.

 

·        There should be a menu that allow to select grade of class.

·        Created questions should be mixed type (addition and subtraction).

·        User will give number of questions that will be generated for a paper.

·        Ratio of addition and subtraction questions is not fixed. It will random, a paper can have more questions of one type than other. See sample output screenshot.

·        Number of minimum and maximum digits in paper of grade 1 will be two.

·        Number of minimum and maximum digits in paper of grade 2 will be three.

·        Number of minimum and maximum digits in paper of grade 3 will be four.

·        Number of minimum and maximum digits in paper of grade 4 will be five.

·        Number of minimum and maximum digits in paper of grade 5 will be six.

·        Screen shot of required application is given below as simple output.

·        Most critical requirement is, the operand (number) on left side of subtraction sign must be larger than the number on right side of sign (operator). This requirement is highlighted in sample screenshot too.

·        In case of addition operation, the operand (number) on left side of addition sign can be larger or smaller from the number on right side of sign (operator).  

 

Solution instructions:

·        Variables, loops, if-else, rand() function with % operator, functions (one which return a value and one which do not return a value) will help you to solve the problem.

·        Use rand() function to generate a random number. You can control the range of number with the help of modulus (%) operator.

·        To use rand() function you must include “stdlib.h” header file.

·        To control the range of random number rand() % N can help, if value of N will be 100 then  range of randomly generated number will be 0 to 99.

·        If you want to control the range of random number between 10 to 19 then following formula will help.

o       [10 + rand() % (19 – 10 + 1)]

 

 

 

 

 

 

 

 

 

 

Sample output:

In case of subtraction number on left side of operator must be larger than number on right side

 

In case of addition number on left side of operator can be smaller than number on right side

 

 

 

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 4499

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

File in .cpp extension 

devc++

CS201 assignment 1 Solution Fall 2019 cs201 assignment 1 solution 2019 CS201 assignment cs201 assignment solution 2019 Vu assignment Solution

*************

CS201 Assignment#01 Solution Fall 2019

below link 

cs201_assignment1_(1)

Sab me aik hi bug hai ke agar user "number" greater than "5" select kr rha hai tab bhi program chal rha hai. 

Cs201 Assignment No 1 Solution Fall 2019

below link

Cs201 Assignment No 1 Solution Fall 2019

RSS

Latest Activity

ٹمبکٹو posted discussions
56 minutes ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to + IUUOƆƎUT +'s discussion یہ تو حسن و عشق کے ہیں مرحلے
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked + IUUOƆƎUT +'s discussion یہ تو حسن و عشق کے ہیں مرحلے
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to + ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤'s discussion hapy birthday my loving friend sister nabooo ;-* ;-* ❤❤❤❤❤❤❤❤
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to + ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤'s discussion hapy birthday my loving friend sister nabooo ;-* ;-* ❤❤❤❤❤❤❤❤
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked + ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤'s discussion hapy birthday my loving friend sister nabooo ;-* ;-* ❤❤❤❤❤❤❤❤
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to zohaib iftikhar's discussion ...* APNI ZUBAN KI TAIZI KABHI MAT AZMANA...KHAS TOR PE?...*
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked zohaib iftikhar's discussion ...* APNI ZUBAN KI TAIZI KABHI MAT AZMANA...KHAS TOR PE?...*
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to zohaib iftikhar's discussion ...*ZUBAN B KITNI AJEEB HAI?...*
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked zohaib iftikhar's discussion ...*ZUBAN B KITNI AJEEB HAI?...*
4 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to ٹمبکٹو's discussion حاضری
4 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked ٹمبکٹو's discussion حاضری
4 hours ago

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.