C
C++
Java
C#
Python
Suggest Program
C#
All Programs
C# Programs
(150)
C# Function to test for a valid triangle.
C# Function to determine whether the year is a leap year or not.Any year is entered through the keyboard.
C# Function distance that calculates the distance between two points (x1, y1) and (x2, y2). All numbers and return values should be of type double.
C# Function which receives a float and an int from main(), finds the product of these two and returns the product which is printed through main().
C# Function that prints perimeter and area of right triangle.
C# Function that converts inches to centimetre.
C# Function which prints square of given number.
C# Function that returns the maximum of three floating-point numbers.
C# Function which returns the smaller of its two parameters.
C# Function which returns the absolute value of an integer that is passed as a parameter.
C# Program to demonstrate that one function can be called multiple times.
C# Program to demonstrate sending and receiving values between functions.
C# Program to find if a square matrix is symmetric.
C# Program to find transpose of matrix.
C# Program to print identity matrix of size M * N. All the diagonal element in identity matrix are 1.
C# Program to find upper triangle in the given matrix.
C# Program to find lower triangle in the given matrix.
C# Program to fill the diagonal of a matrix with 0, the lower left triangle with -1 and the upper left triangle with 1.
Read in 20 numbers,each of which is between 10 and 100, inclusive.As each number is read print it only if it’s not a duplicate of a number already read.Provide for the worst case in which all 20 numbers are different. Use the smallest possible array to solve this problem.
C# Program to sort an array.
C# Program to pick up the largest number from any 5 row by 5 column matrix.
C# Program to print Pascal triangle.
C# Program to implement the Selection Sort.
C# Program to implement the Bubble Sort.
C# Program to implement the Insertion sort.
C# Program to implement Binary search.
C# Program to addition of two 3*3 matrix.
C# Program that tests if every element of array A is equal to corresponding element in array B. In other words program must check if A [0] is equal to B [0] and so on... The program prints 1 if all elements are equal and prints 0 if at least one element is not equal.
C# Program to find ascending order and median number of array.
C# Program that interchanges the odd and even elements of an array.
C# Program to exchange the smallest and largest number in an array of N integers.
C# Program to find larger from the array of integers and also find its index.
C# Program to find out how many of them are positive, negative, even and odd.
C# Program to print sum and average of all the elements of an array.
C# Program to copy the contents of one array into another in the reverse order.
C# Program to initialize a three-dimensional array threed[3][2][3]. Print the first and last element in this array.
C# Program to reverse an element of an array without using second array.
C# Program to add 1 to each of the 15 elements of integer array.
C# Program to print the five values of integer array.
C# Program to read the 12 values of floating-point array.
C# program to initialize the 10 elements of integer array to zero.
C# Program to print following star pattern: * * * * * * * * * * * * * * * * *
C# Program that creates the following pattern, given the height and width =========== * * * * * * * * ===========
C# Program to prints a hollow square of size 5.
C# Program to fill the entire screen with diamond and heart alternatively. (Note: The ASCII value for heart is 3 and that of diamond is 4)
C# Program to fill the entire screen with a smiling face. The smiling face has an ASCII value.
C# Program to Print Patterns of numbers
C# star pattern with height and width
C# Program to print a number series from 1 to user specified limit in the form of a rectangle.
C# Program that allows any positive integer to be typed in. The program should count how many times the number has to be doubled before it reaches 1 million.
Population of a town today is 100000. The population has increased steadily at the rate of 10 % per year for last 10 years. C# Program to determine the population at the end of each year in the last decade.
When interest compounds q times per year at an annual rate of r % for n years, the principle p compounds to an amount a as per the following formula a = p (1 + r / q) nq. C# Program to read 10 sets of p, r, n & q and calculate the corresponding as.
C# Program to calculate the monthly instalment for each month of loan duration. If loan amount, number of months and rate of interest are entered through keyboard.
C# Program to calculate overtime pay of 10 employees. Overtime is paid at the rate of Rs. 12.00 per hour for every hour worked above 40 hours. Assume that employees do not work for fractional part of an hour.
C# Program to generate all combinations of 1, 2 and 3 using for loop.
C# Program to generate Pythagorean triplets in 1 to 100. 3 4 5 is Pythagorean triplet where 3*3+4*4=5*5.
C# Program to print first N Fibonacci numbers.
C# Program to check whether given number is perfect or not.
C# Program to check whether given number is Armstrong or not.
C# Program that reads an integer and determines and prints how many digits in the integer are 7's.
C# Program that utilizes looping to produce the following table of values: A A+2 A+4 A+6 3 5 7 9 6 8 10 12 9 11 13 15 12 14 16 18 15 17 19 21
C# Program to sum all the digits of given integer numbers.
C# Program that uses looping to print the following table of values. Use the tab escape sequence, \t, in the printf statement to separate the columns with tabs. N 10*N 100*N 1000*N 1 10 100 1000 2 20 200 2000 3 30 300 3000 4 40 400 4000 5 50 500 5000 6 60 600 6000 7 70 700 7000 8 80 800 8000 9 90 900 9000 10 100 1000 10000
C# Program to add first seven terms of the following series using a for loop: 1 /1! + 2/2! + 3/3!......
C# Program to find the value of one number raised to the power of another.
C# program to print the multiplication table of the number entered by the user. The table should get displayed in the following form. 29 * 1 = 29 29 * 2 = 58 ...
C# program to print ASCII values of all characters
C# Program that prints 100 asterisks, one at a time. After every tenth asterisk, your program should print a newline character. [Hint: Count from 1 to 100. Use the remainder operator to recognize each time the counter reaches a multiple of 10.
C# Program containing a loop that counts 1 to 1000 using a variable i, which is incremented each time around the loop. The program should print out the value of i every hundred iterations.
C# Program that counts how many of the numbers are positive and negative, the program should print out two totals before terminating.
C# Program to read n floating point numbers from user and calculate average of positive numbers as well as negative number.
C# Program to print all integer greater then 100 and less than 200 that are divisible by 7.
C# Program to sum the following series. Sum = 1 - 2 + 3 - 4 + 5......N
C# Program to compute sum of following series: 12+22+32.....102
C# Program to print sum and average of N numbers.
C# Program that calculates and prints the product of the odd integers from 1 to 15.
C# Program to print number and its square root for 0 to 9.
C# Program to calculate the square of integers 1 to 10.
C# Program to find sum of odd numbers in given range.
C# Program to print all odd numbers between 15 and 45
C# Program that calculates and prints the sum of the even integers from 2 to 30
C# Program to calculate sum of integers 1 through 100.
C# Program to print all the integers between given two floating point numbers.
C# Program to print 1,4,7,10,13… series up to N
C# Program to print first 50 numbers in series 1, 4, 7, 10...49
C# Program to print series like 7,9,11,13,15........67
C# Program that reads five numbers (each between 1 and 30). For each number read, your program should print a line containing that number of adjacent asterisks. For example, if your program reads the number seven, it should print *******
C# Program to print a line of 60 asterisks using for loop
C# Program to print 10 to 1 using for loop
C# Program to print 1 to 10 using for loop
The marks obtained by a student in 5 different subjects are input through the keyboard. The student gets a division as per the following rules: Percentage above or equal to 60 - First division Percentage between 50 and 59 - Second division Percentage between 40 and 49 - Third division Percentage less than 40 - Fail C# Program to calculate the division obtained by the student.
In a company an employee is paid as under: If his basic salary is less than Rs. 1500, then HRA = 10 % of basic salary and DA = 90 % of basic salary.If his salary is either equal to or above Rs.1500,then HRA = Rs. 500 and DA = 98 % of basic salary. If the employee's salary is input through the keyboard write a C# program to find his gross salary.
Given the length and breadth of a rectangle, write a C# program to find whether the area of the rectangle is greater than its perimeter. For example, the area of the rectangle with length = 5 and breadth = 4 is greater than its perimeter.
C# Program to check whether a triangle is valid or not, when the three angles of the triangle are entered through the keyboard. A triangle is valid if the sum of all the three angles is equal to 180 degrees.
If the three sides of a triangle are entered through the keyboard, write a C# 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.
While purchasing certain items, a discount of 10% is offered if the quantity purchased is more than 1000. If quantity and price per item are input through the keyboard, write a C# program to calculate the total expenses.
The current year and the year in which the employee joined the organization are entered through the keyboard. If the number of years for which the employee has served the organization is greater than 3 then a bonus of Rs. 2500/- is given to the employee. If the years of service are not greater than 3, then the program should do nothing.
C# program to find absolute value of a number.
C# Program to compute x for given y=3x+5 if x<=10 y=8x+5 if x>10
Menu driven C# program for basic arithmetic operations
C# Program to display month name according to the month number using Switch Statement
C# Program to find month of year that, given an integer between 1 and 12, print the corresponding month of the year.
If the ages of Ram, Shyam and Ajay are input through the keyboard, C# Program to determine the youngest of the three.
C# Program to input numbers and determine whether it is within a given range.
C# Program that asks the user to input two integers, a and b, and then state whether or not a is evenly divisible by b.
C# Program that inputs two integers and determines whether it is evenly divisible by 6 and 7.
C# Program that reads two real numbers and tells whether the product of two numbers is equal or greater than 100.
C# Program that inputs one five-digit number separates the number into its individual digits and prints the digits separated from one another by three spaces each. [Hint: Use combinations of integer division and the remainder operation.] For example, if the user types in 42139, the program should print: 4 2 1 3 9
C# Program to convert and print the distance in meters, feet, inches, yard and centimetres and the distance between two cities (in km.) is input through the keyboard.
C# Program to Convert a Given Number of Days in terms of Years, Weeks & Days
Consider a currency system in which there are notes of seven denominations, namely, Rs 1, Rs 2, Rs 5, Rs 10, Rs 50, Rs 100. if a sum of Rs N is entered through the keyboard, write a C# program to compute the smallest number of notes that will combine to give Rs. N.
Write a program to create a customer's bill for a company. The company sells only five different products: TV, VCR, Remote controller, CD player and the tape recorder. The unit price is $400, $220, $35.20, $300 and $150 respectively. The program must read the quantity of each piece of equipment purchased from the keyboard. It then calculates the cost of each item, the sub total and the total cost after an 8.25% sales tax.
A cashier has currency notes of denominations 10, 50 and 100. If the amount to be withdrawn is input through the keyboard in hundreds, find the total number of currency notes of each denomination the cashier will have to give to the withdrawer.
In a town, the percentage of men is 52. The percentage of total literacy is 48. If total percentage of literate men is 35 of the total population, write a program to find the total number of illiterate men and women if the population of the town is 80,000.
C# Program for the right most digit of a number.
C# Program to receive values of latitude and longitude in degress, of two places on earth and outputs the distance between them in nautical miles. The formula for distance in nautical is : D=3963 cos
^{-1}
(sinL1sinL2+cosL1cosL2*cos(G2-G1))
C# Program to find the cost price of one item, if the total selling price of 15 items and the total profit earned on them is input through the keyboard.
C# Program to calculate a student's average score for a course with 4 quizzes, 2 midterms and a final. The quizzers are weighted 30%, the midterms 40%, and the final 30%.
C# Program to calculate gross salary of an employee.
C# Program to calculate total average and percentage of five subjects.
C# Program that user enter an angle measured in radians and convert it into degrees. [1 radian = 57.295779 degrees]
C# Program to convert a temperature in Fahrenheit to its Celsius equivalent, and one to convert a Celsius temperature to Fahrenheit.
C# Program to Calculate the Area of a Triangle
C# Program to Calculate Area of Rectangle
C# Program to calculate volume of a cube
C# Program to Find the Volume of a Cylinder
C# Program to find area and volume of sphere.
C# Program which reads the radius of circle and computes its area, diameter and circumference. Also perform the same program using symbolic constant.
C# Program to find area and perimeter of rectangle.
C# Program to calculate simple interest.
C# Program to calculate average of four integers.
C# Program To Calculate Square And Cube Of Given Number
C# Program that asks the user to enter two numbers and prints their sum, product, difference, quotient and remainder.
C# Program for Swapping of two numbers.
C# Program that prompts the user to enter an integer and then prints the integer first as a character, than as a decimal, and finally as a float. Use separate print statements. A sample run is shown below. The number as a character: k The number as a decimal: 75 The number as a float: 0.000000
C# Program that asks the user to enter a quantity and cost. The values are to be read into an integer named quantity and float named unit price. Define variables, and use only one statement to read the values. After reading the value skip one line and print each value, with an appropriate name on a separate line.
C# Program to store the five vowels(a,e,i,o,u) in five suitably declared variables. Then print out the contents of the variables on a single line
C# Program to demonstrate integers and real variable declaration, initialization and printing of values.
C# Program to Find out Sum of digit of given number
C# Program to find Factorial of a Number
C# Program to reverse a Number.
C# Program to Find ASCII value of a Character
C# Program to check whether a year is Leap year or not.
C# Program to check whether a Number is Even or Odd.
C# Program that uses four print statement to print following pattern. * ** *** ****
C# Program to prints the 1 to 4 number.
C# Program to print multiple lines with a single print statement
C# Program that prints your Name and Address
C# Program to print "Hello World".
C# Program to check whether given number is prime or not.