Comments
Pages
Home
Object Oriented Programming
Professor Don Knuth's
About us
Join This Site
Learn Unity3d AI Programming
Wednesday, October 17, 2012
Show Array in assending order
Posted by
MindBreaker
at 8:12 AM
Read our
previous post
Object
Write a function which takes an array of 10 elements and sort them in ascending order. Print sorted array from the
calling function.
Source code
#include
<iostream>
using
namespace
std;
int
factorial (
int
);
int
factorial (
int
num)
{
int
ans=1, fac;
for
(fac=1;fac<=num;fac++)
{
ans=ans*fac;
}
return
(ans);
}
void
main(
void
)
{
int
num , fact,fac;
cout<<
"Enter the number :"
;
cin>>num;
fact=factorial(num);
cout<<
"The factorial of number are:"
<<fact<<endl;
cout<<
"The number of Execution:"
<<num<<endl;
}
Output
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Popular Posts
Bubble sort using pointers.
Object: Bubble sort using pointers. Source Code: #include <iostream> using namespace std; void bubble( int *, int...
Codepirate
CodePirate Admin Hello, all my user and followers who use this site. this site is specially for the people who like programming and...
OOP Create Object for switch board
Object Cre a te an objct for switch board which take user input and how many board he want to enter and number of swiches,regulato...
Add Display and Delete string from Text file in c++
Object how to Add data within Existing data of text file and Display, Search it and Delete it from text file. Source code: #include ...
Create File and Put Some Message into It
Create a file "Test.txt" and enter some text message into it. Source code #include <iostream> #include ...
OOP Object of the Book copy string to other string in class
Object C reate an object for the book which ask user to input about author,number of pages, quality of book,type of book,and Title of ...
Compare two array without using strcmp()
Object 1- Compare two array without using strcmp() Source code #include <iostream> using namespace std; ...
OOP initialize data in function and show it using showdata function
Object Create an employee class, basing it on Exercise 4 of Chapter 4. The member data should comprise an int for storing the employe...
Find the Bigger number of the 3
Object: Find the Bigger number of the 3 Source Code: #include <iostream> using namespace std; class number...
OOP Write program using Operator Overloading
Object : Write program for add and subtract and check equal numbers real and imaginary numbers using operator overloading Source code...
Labels
add two matrix
array
arrays
average numbers in arrays
average values
Binary Search
Bubble sort
Bubble sort in ascending order using pointers.assenting order
Bubble sort using pointers
c++
C++ programs.Codepirarte2012
Circular linklist
Code
Codepirate
CODEPIRATE2012
Codes
Codings
Convert celcius temperature into Frenhiet
day month year calculator
days
days month year convert
days month year convert using pointers and arrays
delete
delete from array
delete number from
Delete numbers using binary search
delete text from file
display
display text in file
Double headed link list
Double link list.link list
Even
even odd values in arrays
filling Add text in file
Find the 15 multiple of any number
Find the Bigger number of the 3
Find the Remainder quotient between two number
Find the Roots Quadratic of the equations
Find the smallest number in array
Find the Uppercase lower case in sentences
insert
insert values in arrays
linear search algorithm.find location in array
linklist
Lower case
MANAGEMENT
matrix
matrix multiplication algorithm
merge sort
Merge sort using arrays
month
multiple two matrix
odd
pointers
pop
product of sum
program
Programmings
programs.C++
PROJECT
push
return in array
Roots using array.quadratic roots
scalar values adding to matrix
search text i filling
smallest number
stack
sum of product
TAXI RESERVATION
Translate binary search and insertion algorithm into a program which finds either the location LOC where ITEM appears in ARRAY or the location
two dimension array
two number reminder
Uppercase
using array and pointers
using pointer
using pointers
values in array
values in arrays
Word in sentences
Write a program that count the Words in the sentence
year
© Codepirate is powered by
Blogger
-
Template designed by
Stramaxon - Best SEO Template
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.