W
whojustdenyme
I'm new to C...trying to get help on this
#include<stdio.h>
#include<math.h>
int main()
{
int decVal; //DECIMAL VALUE
int round; //# OF PLACES TO ROUND
float a; //ANSWER AFTER ROUNDING
float x;
float y;
printf("Enter a number as a decimal value (ie. 3.1459): ");
scanf("%d", &decVal);
printf("Enter the number of places to round (ie. 3): ");
scanf("%d", &round);
printf("%d",decVal);
printf("The number %d rounded to %d decimal places is %f", decVal,
round);
return(0);
}
#include<stdio.h>
#include<math.h>
int main()
{
int decVal; //DECIMAL VALUE
int round; //# OF PLACES TO ROUND
float a; //ANSWER AFTER ROUNDING
float x;
float y;
printf("Enter a number as a decimal value (ie. 3.1459): ");
scanf("%d", &decVal);
printf("Enter the number of places to round (ie. 3): ");
scanf("%d", &round);
printf("%d",decVal);
printf("The number %d rounded to %d decimal places is %f", decVal,
round);
return(0);
}