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

CS 105 Assignment

assignment

Uploaded by

sultanameer008
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)
5 views1 page

CS 105 Assignment

assignment

Uploaded by

sultanameer008
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

CS-105

Assignment

1.Write a program that inputs three numbers and finds out the largest number using logical
operators and ‘if-else-if’ structure.

2.Write a program that inputs any character through keyboard and determines whether it is a
capital letter,small letter, a digit or a special symbol using logical operators and ‘if-else-if’ structure.

3.Write a program that calculates the sum of squares of all odd numbers between 1 and 100 using
the wile loop.

4.write a program that inputs and displays the lowest digit and highest digit in the number.for
example,for example, if the user enters 39517, the program should display the output as follows:

The lowest digit in the number 39517 = 1

The highest digit in the number 39517 = 9

5.Write a program that displays the sum of the following series using the for loop:

1.0+1.1+1.3+1.4+1.5+ ………………..+10.0

6.Write a program that displays the following output using the for loop:

100,99,98,97,96,95,…………………….,8,7,6,5,4,3,2,1

7.Write a program that inputs and checks whether it is a palindrome or not using the ‘while’ loop.A
number is palindrome if it is read same backward and forward.for example the numbers 4994,
6886, and 62526 are palindrome numbers.

You might also like