C program to define power of a function, C/C++ Programming

C program to define power of a function:

Write a program to use power of a function.

void main()

{

int x,y,po=1,i,j;

clrscr();

 

printf("Give x,y\n");

scanf("%d %d",&x,&y);

 

  for(i=1;i<=y;i++)

   {

   po=po*x;

   }

 

printf("%d power %d is %d",x,y,po);

getch();

}

Posted Date: 10/19/2012 3:02:30 AM | Location : United States







Related Discussions:- C program to define power of a function, Assignment Help, Ask Question on C program to define power of a function, Get Answer, Expert's Help, C program to define power of a function Discussions

Write discussion on C program to define power of a function
Your posts are moderated
Related Questions
having 2 arrays and 3killograms of pebbles are needed converting an area of 1 square meter the rate of pebble is $5 per killograms

Additional keywords in C++ Class     friend    virtual   inline private  public    protected     const this         new       delete   operator The actual use and expl


I have a program for school and I am not understanding why one of the variables gets skipped or the arithmetic operators aren''t having any effect as I have tryed defining it sever

Specifying a Class: As discussed a class is defined to develop an algorithm and bind it together in a core shell. A class is an abstract data type (ADT).  The binding of dat

payment system, in c++ only..just use the printf or scanf.please


This problem familiarizes you with using random numbers in C++. The program is to compute a good approximation of π using a simulation method called "Monte Carlo". The following fi

I need to program a microprocessor that would have a temperature, gas, humidity and PIR sensor connected to it. It would send the data to a PC via a Zigbee and receive commands fro

Define the Data Type Qualifiers in c Language? 1. const 2. volatile const: The const qualifier is used to tell C that the variable value can't change after initialization.