hi
This is Poornima.L
any one can u help me
how to convert double to int ????
int int_var=(int)double_var;
wen i give the above stmt
i get floating point error:abnormal termination in my console screen
help me out
poornimashobana
0
Newbie Poster
Recommended Answers
Jump to PostOne example:
#include <stdio.h> int main() { int i, n ; double d = 0.0; d = 3.33 * 3; n = d; printf("\n N=%d D=%lf", n, d); printf("\n\n\t\t\t press enter when ready"); i = getchar(); ++i; return 0; }
Note how anything after the decimal point …
All 3 Replies
Adak
419
Nearly a Posting Virtuoso
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
poornimashobana
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.