this is a program that gets the : 1.the largest integer smaller - TopicsExpress



          

this is a program that gets the : 1.the largest integer smaller than or equal to this value; 2. the nearest integer to this value, with halfway values rounded away from zero; 3.the smallest integer larger than or equal to this value •The output integers should be separated by a space character and followed by a newline character. •The output values should not have any trailing zeros: e.g. 2 not 2.0. int main() { float aFloat; int AnsOne; int AnsSecond; int AnsThird; printf(Please enter a number\n); scanf(%f,&aFloat); //round down AnsOne = aFloat; //depend on the number if it is bigger than .5 round up otherwise round down if (AnsOne + .5
Posted on: Mon, 15 Sep 2014 20:55:28 +0000

Trending Topics



Recently Viewed Topics




© 2015