Programs
Programs
KGiSL - iTech 1
odd number series and even number series based on the user given number.
OWrite a program to
of star.
O *
** ***
of star.
O *
* * * * *
an item is input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred.
whether a triangle is valid or not, when the three angles of the triangle are entered through the keyboard.
breadth of a rectangle, write a program to find whether the area of the rectangle is greater than its perimeter.
the keyboard, write a program to determine whether the character entered is a capital letter, a small case letter, a digit or a special symbol.
Characters AZ az 09 65 90
ASCII Values
OWrite a program to
returned late. For first 5 days the fine is 50 paise, for 6-10 days fine is one rupee and above 10 days fine is 5 rupees. If you return the book after 30 days your membership will be cancelled. Write a program to accept the number of days the member is late to return the book and display the fine or the appropriate message.
triangle are entered through the keyboard, write a program to check whether the triangle is valid or not. The triangle is valid if the sum of two sides is greater than the largest of the three sides.
in reverse order.
1 - 10 and print the numbers from 1 - 10 other than the user given number.(using continue)
OWrite a program to
number 45*45=2025; 20+25=45.Write a program to generate number between 32 and 99 that satisfies the above property.
two digit number, the second digit of which is smaller than its first digit by 4, and if the number was divided by the digits sum, the quotient would be 7.
overtime pay of 3 employees. Overtime is paid at the rate of Rs. 12.00 per hour for every hour worked above 40 hours.
through the keyboard. Write a program to find the value of one number raised to the power of another.
Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number. For example, 153 = ( 1 * 1*1)+(5*5*5)+(3*3*3)
all prime numbers from 1 to 300. (Hint: Use nested loops, break and continue)
the multiplication table of the number entered by the user. The table should get displayed in the following form.
O29 * 1 = 29 O29 * 2 = 58
numbers till the user wants and at the end it should display the count of positive, negative and zeros entered.
OWrite a program to
ARRAYS
OWrite a program to find
OWrite a program to
check whether the given array elements are in Arithmetic Progression or not.
two 1D arrays.
OWrite a program to
OWrite a program to
OWrite a program to do a
matrix multiplication.
Functions
OWrite a program to find
out the factorial for the user given number.(5! =5x4x3x2x1 i.e 5!=5x4!)
program for addition, subtraction, multiplication and division of two given numbers using function. The main() should have function calls only.
OWrite a program to
accept the student name and three marks from the user and calculate the total, average and grade using functions.
the given number is an Amstrong number or not. 153 =>No.of its digits is 3 => 1^3 + 5^3 + 3^3 = 1+125+27 = 153(same as the given number)
the given number is an Adam number or not. 12 square(12)=144 reverse(144)=441 square root(441)=21reverse(21)=1 2(same as the given number)
Strings
OWrite a program to
welcome the user if their username and the password are of same size.
OWrite a program to
welcome the user if their username and the password are same.
OWrite a program to
welcome the user until they give the same username and the password.
and give them the same username as the password. Then ask them to check for the login by asking username and password. If they are valid give a welcome note. If not throw an error message.
Student No and the Dept name and the password. Password should be in the format of Student No@Dept(Eg: 101@ece). If it is valid give a welcome note. If not ask them whether they wish to try again or not. If they wish provide the needs. If not terminate the program after saying an end note.
OWrite a program to
OWrite a program to
find out number of capital letters, small letters, spaces and special characters in a given string.
OWrite a program to
convert a uppercase string into lowercase and lowercase string into uppercase.