Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

JaskaranSingh 4532244 Test2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

PROG1124 – Software Development

Test – 2 (30%)
Term: Spring 2023 Professor: Dr. Manisha Krishnan
Course: PROG1124 – Software Development Email: manisha.krishnan@niagaracollegetoronto.
ca

Please Be Advised That:


1. Lab must be completed as an individual effort. Do not collaborate with anyone or share it with any
individual, party or entity.
2. Do not share this lab with anyone or any 3rd party without the written consent of the professor.
3. This test is of 30%.
4. Complete it and upload it to Canvas by due date/time, mentioned in Canvas.
5. All online submissions will be done via Canvas (Email submissions will NOT be accepted).
6. Corrupt/incorrect submissions will be graded as zero.
7. Make sure your PCs/laptops are in good working condition. If something does not work, or any
application or system crashes, you will be responsible to fix it and submit your work on time. No
excuses will be accepted during the lab.
8. Make sure your Visual Studio is in good working condition. No excuses will be entertained regarding
issues with Visual Studio.

Copyright Disclaimer:
The materials provided in class and in Canvas are protected by copyright. They are intended for the
personal, educational uses of students in this course and should not be shared externally or on websites
such as Chegg, Course Hero or OneClass. Unauthorized distribution may result in copyright
infringement and violation of Niagara College’s policies.

Submission Instructions:
1. Download this document. Rename it as YourFirstnameLastname_YourStudentID_Test2.
2. Take two screenshots of each project and paste them at the spaces provided in this document:
 Run the project and take a screenshot of the output (active) window.
 Screenshot of the whole Visual Studio screen including the Taskbar that shows the date and
time.
 Use Alt + PrtSc to take the screenshot of the active window.
 Use PrtSc to take the screenshot of the whole screen.
3. Make sure the screenshots are clear and readable.
4. Please note that if your screenshots didn’t follow the above-mentioned instructions, your lab will not
be graded.
5. When finished, submit it to Test-2 under Assignments module on Canvas.

Page 1 of 7
PROG1124 – Software Development

Question 1: Write a C# program that outputs the numbers from 50 to -50 counting down by 5’s.
For e.g.: 50 45 40 35 30 25 20 15 10 5 0 -5 -10 -15 -20 -25 -30 -35 -40 -45 -50 (5 marks)

[Take a screenshot of the C# sharp code in the Visual studio window and paste it here]

Page 2 of 7
PROG1124 – Software Development

[Take a screenshot of the whole output screen and paste it here]

Question 2: Write a C# program to get a number from the user to print the result of the Fibonacci
series. (5 marks)
Eg: Enter a number:7
0 1 1 2 3 5 8

Hint: Print 0 and 1. To calculate the third number = sum of first 2 numbers, fourth number = sum of third
number and second number and so on. Ie., The series is number = sum of the previous 2 numbers.

Page 3 of 7
PROG1124 – Software Development

[Take a screenshot of the C# sharp code in the Visual studio window and paste it here]

Page 4 of 7
PROG1124 – Software Development

[Take a screenshot of the whole output screen and paste it here]

Question 3: Write a C# program to count the number of digits in a number entered by the user.
(5marks)
Eg: Enter the number : 23567
Output: Number of digits = 5

Page 5 of 7
PROG1124 – Software Development

[Take a screenshot of the C# sharp code in the Visual studio window and paste it here]

Page 6 of 7
PROG1124 – Software Development

[Take a screenshot of the whole output screen and paste it here]

Page 7 of 7

You might also like