Skip to Main Content
Programming and Data Structures
book

Programming and Data Structures

by Ashok Kamthane
August 2009
Intermediate to advanced content levelIntermediate to advanced
604 pages
21h 39m
English
Pearson India
Content preview from Programming and Data Structures
140 Programming and Data Structures
6.25 Write a program to enter mantissa and exponent. Calculate the value of — m\ Where
'm' is a mantissa and 'x' is an exponent.
mainO
{
int i,number,power;
long ans;
c l r s c r ();
printf ("\n Enter Number
scanf ("%d",&:number);
printf ("\n Enter Power :");
scanf ("%d",&power);
ans=l;
fo r (i=l,n<=power;i++)
ans*-number;
printf ("\nThe Power of%d raised to %d is %ld\n", number,powermans);
getcheO;
I
OUTPUT:
Enter Number : 5
Enter Power : 3
The Power of 5 raised to 3 is 125.
Explanation In the above program mantissa and exponent are entered. The first number is mantissa
and the second is
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Data Structures and Algorithms

Learning Data Structures and Algorithms

Rod Stephens
Data Structures and Algorithms in C++, Second Edition

Data Structures and Algorithms in C++, Second Edition

Michael T. Goodrich, Roberto Tamassia, David M. Mount

Publisher Resources

ISBN: 9789332506343