Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Write a program that takes a 5 digit number and calculates
2 power that number and prints it

Answers were Sorted based on User's Feedback

Write a program that takes a 5 digit number and calculates 2 power that number and prints it..

Write a program that takes a 5 digit number and calculates
2 power that number and prints it

 Is This Answer Correct ? 103 Yes 24 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it..

take no and define array take each letter n then use pow(no,2)

 Is This Answer Correct ? 22 Yes 11 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it..

question :
Write a program that takes a 5 digit number and calculates
2 power that number and prints it

In the compute clause we use the ** for exponential
so write a program using this.

example:

IDENTIFICATION DIVISION.
PROGRAM-ID. SIVARAJAN.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PIC 9(10) VALUE 2.
01 B PIC 9(10) VALUE 12345.
01 EXP PIC 9(25).
PROCEDURE DIVISION.
START-PARA.
COMPUTE EXP=A**B.
DISPLAY EXP.
STOP RUN.

 Is This Answer Correct ? 5 Yes 1 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it..

#include<stdio.h>
#include<math.h>
void main()
{
int a;
double c;
scanf("%5d",&a);
c=pow(a,2);
printf("%f",c);
}

 Is This Answer Correct ? 5 Yes 3 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it..

take one array and that one initilize to n[10]=pow(no,2).
here no =given five digits no

 Is This Answer Correct ? 2 Yes 2 No

More C Interview Questions

What is memcpy() function?

What are the two forms of #include directive?

How to reverse a linked list

What is Memory leakage ?

What is the significance of scope resolution operator?

how to count no of words,characters,lines in a paragraph.

how to impliment 2 or more stacks in a single dimensional array ?

What is integer constants?

prototype of sine function.

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x=4; While(x==1) { X=x-1; Printf(ā%dā,x); --x; } }

What are the different properties of variable number of arguments?

What is atoi and atof in c?

Categories