C++ Solved programs, problems/Examples with solutions

C++ Solved programs, problems with solutions


C++ Solved programs —->  C++ is a powerful general-purpose programming language. It is fast, portable and available in all platforms.

This page contains the C++ solved programs/examples with solutions, here we are providing most important programs on each topic. These C examples cover a wide range of programming areas in Computer Science.

Every example program includes the description of the program, C++ code as well as output of the program. All examples are compiled and tested on a Windows system.

These examples can be as simple and basic as “Hello World” program to extremely tough and advanced C++ programs. Here is the List of C++ solved programs/examples with solutions (category wise) and detailed explanation.


C++ Solved Programs by categories…….


C++ Basic Solved Programs



C++ Number Solved Programs



C++ String Solved Programs



C++ Arrays Solved Programs



C++ Functions Solved Programs



C++ Classes and Objects Solved Programs



C++ Constructor and Destructor Solved Programs



C++ Inheritance Solved Programs



C++ Overloading Solved Programs



C++ Polymorphism Solved Programs



C++ File Handling Solved Programs



C++ Template Solved Programs



If you found any error or any queries related to the above programs or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.


Thanks for reading the post….

4.2 17 votes
Article Rating
Subscribe
Notify of
guest
11 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
zacks

You are tasked by Skontiri Delivery Company, to develop a system to calculate the delivery cost for their clients. Clients are charged per pounds in weight based on the delivery area code. A Provincial delivery code is 1, a National delivery code is 2 and an International delivery code is 3. The fee for the delivery is as follows: For each delivery, enter the delivery number (use as sentinel), weight and specify if the delivery is insured or not. Before you calculate the Price confirm if a valid area code is entered. Price is calculated per pounds based on the… Read more »

Ayna

cout <<“Machine is working: “<< machineisworking;

RAJEEV KRIPASHANKAR SAHAYA

#include <iostream>
#include <string>
#include<math.h>
using namespace std;
int main()
{
  int price=10,total,tax=1.088,weight,area_code,deliveryno;
  cout<<“\n DELIVERY CALCULATOR:”;
  cout<<“\n enter the delivery number”;
  cin>>deliveryno;
  cout<<“\n enter the weight of the package”;
  cin>>weight;
  cout<<“\n Enter the area code from below:\n Provincial delivery code is 1\n a National delivery code is 2\n and an International delivery code is 3.\n”;
  cin>>area_code;
  switch(area_code)
  {
    case 1:
     total=weight*price*tax*1;
     break;
     case 2:
     total=weight*price*tax*2;
     break;
     case 3:
     total=weight*price*tax*3;
     break;
      
  }
  cout<<“\n the delivery fee is:”<<total;
 return 0;
}

Enzo Rivera

Write a program that prompts the user to enter two integers.

The program outputs how many numbers are multiples of 3 and how many numbers are multiples of 5 between the two integers (inclusive)

Parth Sachan

#include
using namespace std;
int main()
{
int a,b,i,count1=0,count2=0;

cout< first integer): “<>a>>b;

for(i=a;i<=b;i++){
if(i%3==0){
++count1;
}
}

for(i=a;i<=b;i++){
if(i%5==0){
++count2;
}
}

cout<<"No. of multiples of 3: "<<count1<<endl;
cout<<"No. of multiples of 5: "<<count2;

return 0;

}

H&M

These programs are wonderful! But, the most important thing is missing is the comments! I am not saying that there should be comment for every line of code but where ever it need so. I am sure without comments, it’s not useful for students nor for anyone novice to programming! That’s why this site has less viewers.
Still, it is something that can be revised anytime.

awais

marks in maths >= 70
marks in physics >= 65
marks in chemistry >= 60
Total marks in all three subjects >= 180

Shehwar Tanveer

Make a function bool Is_Digit (char n) which returns true,..if the character is between character 0 to 9 else, it
returns false using inline function. plz help

maria

Write a program that creates and then reads a matrix of 4 rows and 4 columns of type int. while reading; the program should not accept values greater than 100. For any entered value greater than 100, the program should ask for input repeatedly. After reading all numbers, the system should find the largest number in the matrix and its location or index values. The program should print the largest number and its location (row and column).

Asim

write a programme which stores different tax record of a company

Afaq

There is a garage where the access road can accommodate any number of trucks at
one time. The garage is build such a way that only the last truck entered can be
moved out. Each of the trucks is identified by a positive integer (a truck_id).
Write a program to handle truck moves, allowing for the following commands:
a) On_road (truck_id) b) Enter_garage (truck_ id)
c) Exit_garage (truck_id) d) Show_trucks (garage )
e) Show_trucks(road) f) user menu for function calling