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 |
What is getche() function?
What are the types of assignment statements?
I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.
pgm to reverse string using arrays i.e god is love becomes love is god) (assumption:only space is used for seperation of words) no addtional memory used.i.e no temporary arrays can used.
What tq means in chat?
How to swap 3 numbers without using 4th variable?
What is an array in c?
why the execution starts from main function
Explain how can you tell whether a program was compiled using c versus c++?
What is Lazy evaluation in C? Give an example.
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
What is a sequential access file?