Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

PSUC Lab Assignment: Programming Exercises, Assignments of Performing Arts

A programming lab assignment from psuc (pace school of undergraduate studies), which includes six programming exercises. The exercises cover various topics such as calculating averages, telephone bill calculations, printing even numbers, finding factorials, and checking for armstrong numbers.

Typology: Assignments

2020/2021

Uploaded on 06/10/2021

wiven
wiven 🇺🇸

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Assignment PSUC Lab
1. Write a program to print the average of ages of 10 number of students in
a class.
2. Calculate an amount of a telephone bill for the following criteria.
(Without Loop)
Calls charge per call (Rs.)
1-150 0
151-250 0.9
251-400 1.2
401 onwards 1.5
3. Write a program to print the even numbers from 1 to 50. Also count the
number of such numbers.
4. Write a program to find a factorial of a number.
5. Write a program to print the Fibonacci numbers from 1 to 100.
Hint: (Fibonacci series is 0, 1, 1, 2, 3, 5, 8,.. )
6. Check whether given number is Armstrong number or not. An Armstrong
number of three digits is an integer such that the sum of the cubes of its
digits is equal to the number itself.
(For example, 371 is an Armstrong number since 3^3 + 7^3 + 1^3 = 371.)

Partial preview of the text

Download PSUC Lab Assignment: Programming Exercises and more Assignments Performing Arts in PDF only on Docsity!

Assignment PSUC Lab

  1. Write a program to print the average of ages of 10 number of students in a class.
  2. Calculate an amount of a telephone bill for the following criteria. (Without Loop) Calls charge per call (Rs.) 1-150 0 151-250 0. 251-400 1. 401 onwards 1.
  3. Write a program to print the even numbers from 1 to 50. Also count the number of such numbers.
  4. Write a program to find a factorial of a number.
  5. Write a program to print the Fibonacci numbers from 1 to 100. Hint: (Fibonacci series is 0, 1, 1, 2, 3, 5, 8,.. )
  6. Check whether given number is Armstrong number or not. An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. (For example, 371 is an Armstrong number since 3^3 + 7^3 + 1^3 = 371.)