C++ Program to display current date and time

July 4, 2016

In this example we will learn how to Display current date and time using C++. #include<iostream> #include<cmath> #include <ctime> using […]

C++ Program to get sum of all odd numbers in given range

July 4, 2016

C++ Examples – Sum of ODD Numbers in the Given Range #include<stdio.h> #include <iostream> using namespace std; int main(){ int […]

C++ Program for random number generator

July 4, 2016

Random number generator using C++ #include<iostream> #include<time.h> #include<stdlib.h> #define MAX_NUM 10 using namespace std; void randnum() { int random; srand(time(NULL)); […]

C++ Examples – Bubble sort in C++ code example

July 4, 2016

#include<iostream> using namespace std; int main(){ //declaring array int array[5]; cout<<“Enter 5 numbers randomly : “<<endl; for(int i=0; i<5; i++) […]

C++ Program to Find Cube Root of Number

July 4, 2016

In this example we will learn C++ Program to Find Cube Root of Number. In the first example we will […]

C++ program to find Square Root of a Number

July 4, 2016

In this Example we will learn how to find the square root of a given number using C++. In the […]

C++ Examples – C++ Program to print triangle of characters as below

July 4, 2016

C++ Program to print triangle of characters as below In this lesson we will learn how to print the triangle […]

C++ Examples – C++ program to display reverse pyramid.

July 4, 2016

In the lesson we will learn how to print pyramid of stars in reverse order Like shown below. * * […]

C++ Examples – C++ Program to Check Leap Year

July 4, 2016

In the Julian Calendar, Leap Year (LY) occurs every year divisible by 4. Normally February has 28 days but in a leap year February has […]

C++ Examples – C++ program to find HCF and LCM of two numbers

June 30, 2016

# include <iostream> # include <string> using namespace std; int main() { int a,b,c; cout<< “Enter two nos :”<<endl; cout<< […]

C++ program to arrange 10 numbers in ascending order

June 22, 2016

Write a C++ program and call it sortcheck.cpp which receives 10 numbers from input and checks whether these numbers are […]