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 |
How to implement variable argument functions ?
what is the difference between c and c++?
What is a pointer in c plus plus?
what is the output for this question: main() { int i=1; printf("%d%d%d",i,i++,++i); }
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is a dynamic array in c?
formula to convert 2500mmh2o into m3/hr
write a program to print largest number of each row of a 2D array
What are structural members?
64/square(4)
State the difference between realloc and free.
2.Given the short c program that follows a. make a list of the memory variables in this program b.which lines of code contain operations that change the contents of memory? what are those operations? Void main( void) { Double base; Double height; Double area; Printf(“enter base and height of triangle :”); Scanf(“%lg”, &base); Scanf(“%lg”, &height); Area=base*height/2.0; Printf(“the area of the triangle is %g \n”,area); }