C++ program Sum the Three Integers Using function
Function:
Functions are self contained modules of code that accomplished a specific task. function usually take data , process it and return a result.
code:
#include<iostream>
using namespace std;
int main()
{
void sum(int, int, int);
int number1, number2, number3;
cout << "This Program Calcuates sum of three number:" << "\n";
cout <<...
Sunday, 24 January 2016
PROFIT AND LOSS
C++ Program Calculate the Loss and Profit of Seller
#include<iostream>
using namespace std;
int main()
{
int costprice, sellprice, result;
cout<<"Please enter the cost price: \n";
cin >> costprice;
cout<<"Please enter the selling price: \n";
cin >> sellprice;
if (costprice>sellprice)
{
result = costprice - sellprice;
cout<<"\nSeller Loss of rupees: " <<result;
...
Friday, 22 January 2016
C++ Maximum Using Function
C++ Program Show Maximum Number By Using Function
Function:
Functions are self contained modules of code that accomplished a specific task. function usually take data , process it and return a result.
Object oriented programming:
Object Orientation is a technique for system modeling. Object Oriented Model consists of several interacting objects. An object is: Something tangible, e.g. Ali, Car, House, Tree. Something...
C++TABLE WITH RANGE
C++ Program that Determines the Multiplication Table with Range
#include<iostream>
using namespace std;
int main()
{
int table,range;
cout << "Plaese Enter the Number : \n";
cin >> table;
cout << "Please Enter the Range of the Table : \n";
cin >> range;
for (int x = 1; x <= range; x++)
{
cout << table << "x" << x << "=" << table*x <<...
C++ TABLE
C++ program To Generate Multiplication Table
#include<iostream>
using namespace std;
int main()
{
int table;
cout << "Plaese Enter the Number : \n";
cin >> table;
for (int x = 1; x <= 20; x++)
{
cout << table << "x" << x << "=" << table*x << endl;
}
system("pause");
}
*------------------------------------------------------------------------------------------------------*
#include...
Thursday, 21 January 2016
EVEN AND ODD
C++ Program for Checking Number Is Even or Odd
#include<iostream>
using namespace std;
int main()
{
int number;
cout<<"Please enter the number: \n";
cin>>number;
if (number % 2 == 0)
cout<<"\nThe number is EVEN.\n";
else
cout<<"\nThe number is ODD.\n";
system("pause");
}
...
Wednesday, 20 January 2016
LEAP YEAR
C++ Program For Checking Leap Year Or Not
#include<iostream>
#include<stdlib.h>
using namespace std;
void main()
{
unsigned year;
cout << "Enter any year for check wheather its leap year or not:";
cin >> year;
if (year % 4 == 0)
cout << "Its a leap year"<<endl;
else
cout << "Its not a leap year"<<endl;
cout<<"-------------------------------------------------------------";
...