Program to find the value of e raised to power x using while
loop
Answer Posted / ayyanar.m
include<stdio.h>
#include<math.h>
main()
{
int i=1,e,x,c;
printf("enter the value of x and e);
scanf("%d%d",&x,&e);
while(i<=e)
{
c=pow(x,e);
i=i+1;
}
printf("the sum of series is %f",c);
getch();
}
| Is This Answer Correct ? | 8 Yes | 21 No |
Post New Answer View All Answers
What is structure pointer in c?
Write a simple code fragment that will check if a number is positive or negative.
Explain what is the difference between text files and binary files?
How are pointers declared in c?
What is omp_num_threads?
What are run-time errors?
Why is structure padding done in c?
How do you declare a variable that will hold string values?
What are predefined functions in c?
What is the purpose of the preprocessor directive error?
How do you override a defined macro?
Explain what are the advantages and disadvantages of a heap?
Write a program to swap two numbers without using third variable in c?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
How do you list a file’s date and time?