b374k
v10
today : | at : | safemode : ON
> / home / facebook / twitter / youtube /
name author perms com modified label

The Rank [ used function ] pramana rwxr-xr-x 0 11:08 pm

Filename The Rank [ used function ]
Permission rw-r--r--
Author pramana
Date and Time 11:08 pm
Label
Action
Hello world ..
This time I share a program of the rank ... the rank program I use to make it function ...

the rank is one of the mathematical operations, which the rank comes from the multiplication ...
example: a the rank b = a times a times as many b

The following is the rank c + + program


#include<iostream.h>
#include<conio.h>

double pangkat(int a,int b)
{
  int hasil,i;
  if (b==0)
          { return hasil=0;}
  else if (b==1)
       { return hasil=a;}
  else
          {hasil=a;
       for (i=2;i<=b;i++)
       hasil*=a;
       return hasil;
         }
}

main()
{
  int x=1,y=0;
  cout<<"Calculate the rank"<<endl;
  cout<<"limit value   : ";cin>>x;
  cout<<"Rank value : ";cin>>y;
  cout<<x<<" rank "<<y<<" = "<<pangkat(x,y);
  getch();
}

LET'S LEARN GUYS :)

0 comments:

Post a Comment

 

Jayalah Indonesiaku © 2010 Pramana's BLOG
VB (Vio b374k) Template design by p4r46hcyb3rn3t