Skip to content

silincone/puc1

Repository files navigation

puc1

Has the following C++ programs:

  • C++ program to interchange the values of two variables using a third variable. [click]
  • C++ program to interchange the values of two variables without using a third variable. [click]
  • C++ program to find the area and circumference of a circle. [click]
  • C++ program to find the area of a triangle from values given for the three sides of the triangle. [click]
  • C++ program to convert days into years, months, and days, assuming all months have 30 days. [click]
  • C++ program to find the largest, smallest, and the second among three numbers. [click]
  • C++ program to input total amount in a bill, if the amount is greater than 1000, a discount of 8% is given, otherwise, no output is given. Print the total amount, discount, and the final amount. (Using if-statement) [click]
  • C++ program to check whether the given year is leap year or not. (Using if-else statement) [click]
  • C++ program to check whether the given character is in upper-case or in lower-case. [click]
  • C++ program to input the number of units of electricity consumed in a house and calculate the final amount using nested-if statement. [click]
  • C++ program to input the marks of four subjects and calculate the total, percentage and print the result as either "First class" or "Second class" or "Pass" or "Fail" using switch statement. [click]
  • C++ program to find the sum of all the digits of a number using while statement. [click]
  • C++ program to input principal amount, rate of interest, and time period, and calculate the compound interest using while statement. [click]
  • C++ program to check whether a given number is a power of 2. [click]
  • C++ program to check whether a given number is an Armstrong number or not using do-while statement. [click]
  • C++ program to find the factorial of a number using for statement. [click]
  • C++ program to generate the fibonacci sequence up to a limit using for statement. [click]
  • C++ program to find the sum and average of 'n' numbers. [click]
  • C++ program to find the largest and the second largest of 'n' numbers. [click]
  • C++ program to arrange a list of numbers in ascending order. (Bubble sort) [click]
  • C++ program to find the position of a given number in an array. [click]
  • C++ program to check whether the given matrix is scalar or not. [click]
  • C++ program to find the sum of elements present in all the rows and columns of a matrix separately. [click]
  • C++ program to find the sum of two compatible matrices. [click]

About

puc1 is just a collection of C++ Programs

Resources

Stars

Watchers

Forks

Languages