Professional Documents
Culture Documents
Input a string then show its length is more than 10 characters or not.
For example:
Input a string: KUDCS
Its length is not more than 10 characters
Input a string: University of Karachi
Its length is more than 10 characters
Input a number and then show is it greater than or equal to15 or not.
For example:
Input a number: 9
It is not greater than or equal to 15
Input a number: 20
It is greater than or equal to 15
Input a number and then call a procedure which shows its double.
For example:
Input a number: 4
Its double is 8
Input a number then show series from this number to one in reverse order.
For example:
Input a number: 5
5
4
3
2
1
Input two strings and then show first one is greater or equal in length than second or not.
For example:
Input first: Ali
Input second: Riaz
First one is not greater or equal than second
Input first: Riaz
Input second: Ali
First one is greater or equal than second
Take input a string and then show letter ‘a’ after each alphabet.
For example:
Input a string: net
naeata
Take input an alphabet and then show that is it among asdf or not.
For example:
Input an alphabet: j
It is not in asdf
Input an alphabet: d
It is in asdf
Input three characters and then show middle one first, then last and then first one.
For example:
Input first: 4
Input second: d
Input third: A
dA4
Take input a character and then decide is it digit or not (ASCII code for 0 is 48)
For example:
Input a character: i
It is not a digit
Input a character: 9
It is a digit
Take input a string and then show it one character per line.
For example:
Input a string: KUDCS
K
U
D
C
S
Take input a number and then show its next third number.
For example:
Input a number: 20
23
Input a number: 8
11
Show following series:
ZA,YB,XC,…,AZ
Input values for length and breadth and then display area.
For example:
Input length: 3
Input breadth: 5
Area is: 15