Program to find the value of e raised to power x using while
loop
Answer Posted / pragathi
#include<stdio.h>
void main()
{
int i=1,e,x,s,p=1;
printf("Enter e and x :");
scanf("%d%d",&e,&x);
while(i<=x)
{
p=p*e;
i++;
}
printf("power is %d ",p);
}
here pow(e,x) is calculated using this program.
Is This Answer Correct ? | 46 Yes | 40 No |
Post New Answer View All Answers
What is 1d array in c?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
What is context in c?
Explain what is the benefit of using an enum rather than a #define constant?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
Explain how can a program be made to print the name of a source file where an error occurs?
what does static variable mean?
What are predefined functions in c?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What is strcpy() function?
What does sizeof function do?
What is the difference between %d and %i?
What is a program flowchart and how does it help in writing a program?
What do you mean by command line argument?