C Programming (ج البرمجة)
Pages
Home Page
Programming and IT Research Center
Basic Electronic for C.S.E
Saturday, July 20, 2013
Power in C
Power in C Program
#include<stdio.h>
main()
{
int num,pow,i,p;
printf("Enter value of number: ");
scanf("%d",&num);
printf("Enter value of power: ");
scanf("%d",&pow);
p=1;
i=1;
while(i<=pow)
{
p=p*num;
i++;
}
printf("Power : %d",p);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment