Starter Tutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.
Home » Programming » C++ Programming » Programs » Others

CPP program to illustrate enumerations

Suryateja Pericherla Categories: Others. No Comments on CPP program to illustrate enumerations

In this article we will learn to implement a CPP program to illustrate enumerations. A C++ program is provided below to demonstrate enumerations.   Program is as follows: #include <iostream> using namespace std; int main() { enum direction{left='l', right='r'}; char ch; cout<<"Enter direction (as character): "; cin>>ch; direction d = (direction) ch; switch(d) { case […]

Read the rest of this entry »

CPP program to illustrate scope resolution operator

Suryateja Pericherla Categories: Others. 2 Comments on CPP program to illustrate scope resolution operator

In this article we will learn to implement a CPP program to illustrate scope resolution new and delete operators. A C++ program is given below to demonstrate scope resolution operator, new operator and delete operators.   Program is as follows: #include <iostream> using namespace std; int x = 20; int main() { int x = […]

Read the rest of this entry »

CPP program to calculate the fare for the passengers travelling in a bus

Suryateja Pericherla Categories: Others. No Comments on CPP program to calculate the fare for the passengers travelling in a bus

In this article we will learn to implement a CPP program to calculate the fare for the passengers travelling in a bus. We will write a C++ Program to calculate the fare for the passengers travelling in a bus.   When a Passenger enters the bus, the conductor asks “What distance will you travel?” On […]

Read the rest of this entry »

CPP program to calculate simple interest and compound interest

Suryateja Pericherla Categories: Others. No Comments on CPP program to calculate simple interest and compound interest

In this article we will learn to implement a CPP program to calculate simple interest and compound interest.   A program that computes the simple interest and compound interest payable on principal amount(in Rs.) of loan borrowed by the customer from a bank for a given period of time (in years) at specific rate of […]

Read the rest of this entry »

CPP program to print your name

Suryateja Pericherla Categories: Others. No Comments on CPP program to print your name

In this article we will learn to implement a CPP program to print your name. A C++ program is provided below which reads your name and prints it back.   A simple program on printing “Hello World” and “Hello Name” where “Name” is the input from the user. Program is as follows: /*A simple program […]

Read the rest of this entry »

CPP program to display basic data type values

Suryateja Pericherla Categories: Others. No Comments on CPP program to display basic data type values

In this article we will learn to implement a CPP program to display basic data type values. A C++ program is provided below to print the basic data type values.   This is a C++ program to read and print basic data type values. The float type value must be corrected to 3 places and […]

Read the rest of this entry »

CPP program to add three numbers

Suryateja Pericherla Categories: Others. No Comments on CPP program to add three numbers

In this article we will learn to implement a CPP program to add three numbers. A C++ program is provided below to read three numbers from user and print the sum of those numbers.   Program is as follows: #include <iostream> using namespace std; int main() { int a, b, c; cin>>a>>b>>c; cout<<(a+b+c); return 0; […]

Read the rest of this entry »

CPP program to print Hello World

Suryateja Pericherla Categories: Others. No Comments on CPP program to print Hello World

In this article we will learn to implement a CPP program to print Hello World. A C++ program is provided below to print Hello World! to the stdout (generally console).   Porgram is as follows: #include <iostream> using namespace std; int main() { cout<<"Hello, World!"; return 0; }   Output for the above program is […]

Read the rest of this entry »
Facebook
Twitter
Pinterest
Youtube
Instagram
Blogarama - Blog Directory