C PROGRAMMING DOUBTS DISCUSSION FORUM
A place where you can discuss doubts of c programming
Pages
Home
Elementry Examples
Moderate Examples
Advance problem
Recommendation
Send problems
About
Rounding off a Floating Point Number
Problem Statement
Write a C program to round off a decimal number
#include<stdio.h> int main() { int y; float n; printf("enter the number \n"); scanf("%f",&n); n=n+.5; y=(int)n; printf("roundeed figure id %d\n",y); return 0; }
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment