WARNING: This program will not work for x power y where the resulting value is greater than 32767. Example: 10 power 10 will give you an incorrect value.
#include <stdio.h>
int main()
{
int num, power,i,ans;
printf("Enter number and power\t");
scanf("%d%d",&num,&power);
ans=num;
for(i=1;i<power;i++)
ans=ans*num;
printf("%d to the power %d = %d",num,power,ans);
return 0;
}
C. intake, compression, power, and exhaust
c program was introduced in the year 1972 by Dennis RitchieNo, it was the C language, not the C program.
how to create a c program for left factoring.
C-SPAN Bus program was created in 1993.
No you can't. main() is the entry point of a C program where execution starts. Only a single main() can exist in a C program. A program with 2 mains wil not even compile successfully.
int top=-1; int stack[10];
There is a function called pow in header math.h
Valluru Rao has written: 'Power programming-- Turbo C++' -- subject(s): C++ (Computer program language), Turbo C++ 'Power programming'
C. intake, compression, power, and exhaust
Operation C was created on 1991-01-08.
Operation Cobra happened on 1944-07-31.
If you are going to program in turbo c (for DOS) you might be better using DJGPP. Google DJGPP for downloading and a whole host of good info.
the features of a C program
C and C operation
c program was introduced in the year 1972 by Dennis RitchieNo, it was the C language, not the C program.
C. T. Hirshfeld has written: 'Economic operation of steam turbo-electric stations' -- subject(s): Electric power-plants, Fuel, Management, Steam power-plants
The C wire is important for providing continuous power to a smart thermostat, ensuring its proper functioning and preventing issues like power loss or system malfunctions.