0% found this document useful (0 votes)
4 views1 page

Assignment#1 Simple Programs

This document outlines an assignment for the Programming Fundamentals course under the Department of Data Science & AI, detailing nine programming tasks to be completed by students. The tasks involve basic operations such as digit manipulation, mathematical calculations, and data type handling in programming. The assignment is due on February 27, 2025, and carries a sessional award of 5% towards the final grade.

Uploaded by

Umair Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Assignment#1 Simple Programs

This document outlines an assignment for the Programming Fundamentals course under the Department of Data Science & AI, detailing nine programming tasks to be completed by students. The tasks involve basic operations such as digit manipulation, mathematical calculations, and data type handling in programming. The assignment is due on February 27, 2025, and carries a sessional award of 5% towards the final grade.

Uploaded by

Umair Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Department of Data Science & AI

Level : BSAI-1st Course Name: Programming Fundamentals


Submission Date: 27-02-2025 Course Instructor: Safdar Hussain
Course Code : COSC-1101 Session : 2024-2028 (Spring 2025)
Assignment: Simple Programs
Sessional Award: 5%

1- WAP that takes a 4-digit integer from user and then find out the product of 2nd left-most & 2nd
right-most digits.
2- WAP that takes a number as input from user then find out its absolute, square root values by
using abs( ) & sqrt( ) methods. [NOTE: use math.h file for built-in functions]
3- WAP that find out the 16% of 8% of 4% of an input integer & a floating-point number entered
by user.
4- WAP that takes a 3-digit number from user then display the ASCII Character of the middle digit.
5- WAP that takes values of Divisors & Dividends from user then find the value of Remainder
without using % operator.
6- WAP that initialize a floating-point number. Then apply the ceil( ) and floor( ) methods on it.
Print the resulting values on screen. [NOTE: use math.h file for built-in functions]
7- WAP that takes two integers as input and then exchange their values without using third
variable. (NOTE: If before exchange the num1=27 & num2=51, then after exchange values will
be as num1=51 & num2=27)
8- WAP that takes a floating-point number from user. Then separate & display its integer &
floating-point values on screen.
e.g. if user enters = 52.78, then display
Integer Part = 52
Floating-Part = 0.78
9- WAP that finds the MIN and MAX values of the following data types:
▪ Integer,
▪ Character,
▪ Long

*****Hard worker never worries & finds fruitful result always*****

You might also like