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
Answer / makthar basha
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 |
Answer / ashlesha
take no and define array take each letter n then use pow(no,2)
| Is This Answer Correct ? | 23 Yes | 11 No |
Answer / s.sivarajan
question :
Write a program that takes a 5 digit number and calculates
2 power that number and prints it
answer:
that question ask the exponential.
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 |
Answer / nikita
#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 |
Answer / amarnathreddy
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 |
SRUCTURE PROGRAMMING
What is abstract data structure in c?
What are the standard predefined macros?
how to sort two array of characters and make a new array of characters.
how to find your architecture is LittleEndian or BigEndian?
what are the advantages & disadvantages of unions?
What are .h files and what should I put in them?
why programming language C is still used in operating system's kernel??
Does c have circular shift operators?
what is uses of .net
can we implement multi-threads in c.
difference between memcpy and strcpy