Write a program that calls a function to scale a real number

Write a program that calls a function to scale a real number x into its scientific notation so that 1 lessthanorequalto x

Solution

#include<stdio.h>

#include<math.h>

int main()

{

printf(\"enter number : \");

double x;

scanf(\"%d\",&x);

printf(\"\ enter shift : \");

int n;

scanf(\"%d\",&n);

sci_notation(&x,&n);

printf(\"\ x : %lf \ %d\",x,n);

return 0;

}

void sci_notation(double *x,int *n)

{

double val=pow(10,n);

x=x*val;

}

 Write a program that calls a function to scale a real number x into its scientific notation so that 1 lessthanorequalto x Solution#include<stdio.h> #incl

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site