// newplusplus.cpp : Defines the entry point for the console application.
//share with your friends if u found any errors please comments thanks :) :)
#include "stdafx.h"
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int flag=0;
void sortedoutput(int [], int&);
void input1(int d1[],int &a)
{
for(int i=0; i<a; i++)
{
cout<<"ENTER THE MARKS OF STUDENT"<<i+1<<":";
cin>>d1[i];
...
Sunday, 26 April 2015
Bubble sort values Programme c++ using nested for loop

int main()
{
int arr[50],n;
cout<<"how many number"<<endl;
cin>>n;
for(int i=0; i<n; i++)
{
cout<<"enter the number"<<i+1<<":";
cin>>arr[i];
}
cout<<"THe orignal numbers are"<<endl;
for(int j=0; j<n; j++)
{
cout<<arr[j]<<endl;
}
int hold;
cout<<"Now the sorted vales are"<<endl;
for(int i=0; i<n; i++)
{
for(int j=0;...
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;
...
Saturday, 22 November 2014
Display the following output using C++ language.
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;
...
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;
}
-----------...
Thursday, 13 November 2014
Using for loop to calculate and print product of add integers from 1 to 15.newplusplus panels

#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;
}
-------------------------------------------------
out...
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=...
Subscribe to:
Posts (Atom)