Search
 
SCRIPT & CODE EXAMPLE
 

C

c programming exercises

/**
 * C program to find power of any number
 */

#include <stdio.h>
#include <math.h> // Used for pow() function

int main()
{
    double base, expo, power;

    /* Input two numbers from user */
    printf("Enter base: ");
    scanf("%lf", &base);
    printf("Enter exponent: ");
    scanf("%lf", &expo);

    /* Calculates base^expo */
    power = pow(base, expo);

    printf("%.2lf ^ %.2lf = %.2lf", base, expo, power);

    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: algorithm for dequeue 
C :: Write a C program to multiply two integers using pointers. 
C :: prime numbers 
C :: tuples in c 
C :: redis service 
C :: Compile multiple C files 
C :: struct in struct 
C :: scopes in c 
C :: check for duplicates c 
C :: Increment & Decrement Operator in C language 
C :: c functions 
C :: owasp 
C :: national festivals of india in hindi 
C :: columntransformer in randomizedsearchcv 
C :: allocating memory for 1Mb text file in C 
C :: C++ How to use enums for flags? 
C :: resto de division recursiva 
C :: how to pprint otu a double in in c 
C :: Unix socket I/O primitives 
C :: Parsing using strtok 
C :: YOUNG SEX PARTY underground collection 
C :: Clearing The Input Buffer In C/C++ 
C :: if statement shortcut c 
C :: esp rainmaker led 
C :: maximum, minimum, mean, and median of the data set. in array c programming 
C :: read a string 
C :: is 0 true or false 
C :: online embedded c compiler 
C :: youtube code 
C :: arduino analogwrite 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =