C++ programs


 Home  List of Programs 



  1. Write a program in C++ to print “HELLO WORLD”.
  2. Write a program in C++ to add two numbers and display the result.
  3. Write a program to scan two numbers and display result of their addition, Subtraction, Multiplication and Division.  
  4. Write a program in C++ to scan two numbers, display their contents. Perform swapping of their values and then again display their contents. 
  5. Write a program in C++ to scan a number and identify whether it is even number of odd
  6. Write a program using if else statement to validate the users input to be in the range 1-10. 
  7. Write a program in C++ to scan three integers and display the biggest number
  8. Write a program in C++ to scan two integers and add them if both are positive, multiply them if both are negative, subtract the smaller number from the bigger if both have different signs. 
  9. Write a program to perform division of odd number by an even number and find out the quotient and remainder 
  10.  Write a program to display integers from 1 to 100 using for loop.   
  11.  Write a program to display all the even numbers and odd numbers between 1 and 100 using for loop. 
  12.  Write a program to display integers from 100 to 250 using while loop 
  13. Write a program to display all the even numbers and odd numbers between 1 and 100 using do while loop.   
  14. Write a program to display the following pyramid structure using while loop. 
  
11111 

Program

  1. Program to enter two integer and find their sumand average.
  2. Program to enter, acceleration and time andprint velocity using the formula: v=u+a*t
  3. Program to enter your age and print if youshould be in grade 10.
  4. Program to enter an integer and print if it isgreater or less than 100.
  5. Program to enter sale value and print theagent’s commission.
  6.  Program to switch between different cases.
  7. Program to enter principal, rate & time %print the SI.
  8. Program to an integer and output the cube ofthat integer.
  9. Program to enter an integer and print out itssuccessor.
  10. Program to enter two integer and print thequotient and remainder.
  11. Program to enter an integer and find out if itis even or odd.
  12. Program to enter three integer and find thebiggest no.
  13. Program to enter three integer and find thebiggest no using IF.
  14. Program to enter the unit reading and output thecustomer’s telephone.
  15. Program to enter salary and output income taxand net salary.
  16.  Program to convert days into years and weeks.
  17. Program to find the total days in the year tilldate.
  18.  Program to compute the Fibonacci series.



Comments