This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Graduate students of IIUI

Happiest Moment Celebrating thier life best Achievement

Sunday, 23 November 2014

Source code of to find the palindrome with output screen.






#include "stdafx.h"
#include <iostream>
using namespace std;


int main()
{

  int num,temp,rem,sum=0;
  cout<<"Enter the number ";
  cin>>num;
  temp=num;
  while(num>0)
  {
rem=num%10;
num=num/10;
sum=(sum*10)+rem;
  }
  if(temp==sum)
 cout<<"The number is palindrome"<<sum;
  else
 cout<<"The number is not palindrome";
 
cout<<endl;
  system("pause");
return 0;
}

----------------------------------------------------
The output of this programme is:
palindrome programme

palindrome programme

Saturday, 22 November 2014

Display the following output using C++ language.

newplusplus

Here is C++ Coding

----------------------------------------------------------------

#include "stdafx.h"
#include <iostream>
using namespace std;

int main()
{  
int sum,i,j,lim;
cout<<"ENTER THE LIMIT";
cin>>lim;
for(i=1; i<=lim; i++) //for loop execution
{
cout<<"1";
sum=1;

for(j=2; j<=i; j++) // again for loop execution
{
cout<<"+"<<j;
sum=sum+j;

}
cout<<"="<<sum<<endl;
}
cout<<endl;

system("pause");
return 0;
}

=================================
output of this programe is :

output of the new c plusplus programe


Sunday, 16 November 2014

How to Calculate table in c puls plus programming complete code.





// saved name : Defines the entry point for the console application.
//

#include "stdafx.h"
#include<iostream>
using namespace std;


int main()
{

int table,lenght,c;
cout<<"Enter the table";
cin>>table;
cout<<"Enter the table lenght";
cin>>lenght;
for(c=1; c<=lenght; c++)
{
cout<<table<<"*"<<c<<"="<<table*c<<endl;
}
system("pause");
return 0;
}

-------------------------------------------------------

table using c++



Thursday, 13 November 2014

Using for loop to calculate and print product of add integers from 1 to 15.newplusplus panels

newplusplus odd integer







#include "stdafx.h"
#include <iostream>
using namespace std;

int main()
{
    int i,prod=1;

    for ( i = 1; i <=15; i+=2)
    {
       
            prod = i * prod;
    }
    cout << " product: " << prod <<endl;
system("pause");
    return 0;
}
-------------------------------------------------
output:



Calculate the Factorial of positive number in the range of 0 to 10.














#include "stdafx.h"
#include <iostream>
using namespace std;


int main()
{
int num,i,fact=1;
cout<<"Enter the number "<<endl;
cin>>num; 
if ((num==1)||(num<=10)) 
{
for(i=num;i>1;i--) 
{
fact*=i; //factorial formula 
}
cout<< "factorial of " <<num<<"="<<fact<<endl; 
}
else
cout<<"your enter number= " << num << "is invalid"<<endl;
system("pause");

return 0;
}
---------------------------------------------------

output: 

Thursday, 30 October 2014

How to calculate the Discount on the Shirts| Display the shirts cost and Discount price|

#include "stdafx.h"
#include <iostream>
using namespace std;

int main()
{ float shirts,rate=12,cost,total_price,disc;
cout<<"WELCOME TO THE HOME OF C PLUS PLUS"<<endl;
cout<<"How many shirts would you like:"<<endl;
cin>>shirts;
cost=rate*shirts;
cout<<"The cost of shirts are:"<<cost<<endl;

if(shirts>=5)
{
disc=(cost*10)/100;
cout<<"Discount:"<<disc<<endl;
total_price=cost-disc;
cout<<"Total price:"<<total_price<<endl;
}
else if(shirts>=11)
{
disc=(cost*15)/100;
cout<<"cost:"<<disc<<endl;
total_price=cost-disc;
cout<<"Total price:"<<total_price<<endl;
}

else if(shirts>=21)
{
disc=(cost*20)/100;
cout<<"cost:"<<disc<<endl;
total_price=cost-disc;
cout<<"Total price:"<<total_price<<endl;
}

else if(shirts>=31)
{
disc=(cost*25)/100;
cout<<"cost:"<<disc<<endl;
total_price=cost-disc;
cout<<"Total price:"<<total_price<<endl;
}
system("pause");



return 0;
}

-------------------------------------------------------------------------------------------

we want to buy 10 shirts ,here the totle cost of the shirts is 120 and the discount is 12.


Wednesday, 24 September 2014

Swapping The values of X and Y in C-plusplus programming.




// bilal.cpp : Defines the entry point for the console application.
//www.newplusplus.blogspot.com
//compilar: visual studio 2008
//PROGRAMMER: BILAL KHAN

#include "stdafx.h"
#include <iostream>
using namespace std;

int main()
{

int x;
int y;

cout<<" Enter the value of X : ";
cin>>x;

cout<<" Enter the value of Y: ";
cin>>y;

x = x + y;
y = x - y;
x = x - y;


cout<<" After Swapping the value of X is : "<<x<<endl;
cout<<" After Swapping the value of Y is : "<<y
<<endl;

system("pause");
return 0;
}



----------------------------------------------------------------------------------------------------------------------
OUTPUT OF THE PROGRAMME IS :