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 are the benefits of c language?
What is pointer and structure in c?
What are pointers? What are different types of pointers?
write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR
input may any number except 1,output will always 1.. conditions only one variable should be declare,don't use operators,expressions,array,structure
What is the difference between void main and main in c?
main() { int a=0; if(a=0) printf("Ramco Systems\n"); printf("India\n"); } output?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
write a program to swap two numbers without using temporary variable?
advantages of pointers?
Compare and contrast compilers from interpreters.
Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June