ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1000. A+B Problem

Please help me to find the error
Posted by Md. Asif Imrul 31 Mar 2015 20:16
I want to submit the solution in C language. What language I should choose from the option and what is the error in following coding:-
#include <stdio.h>

int main()
{
    double a,b;
    scanf("%lf %lf",&a,&b);
    printf("%lf",a+b);
    return 0;
}

Edited by author 31.03.2015 20:19
Re: Please help me to find the error
Posted by Snowman 2 Apr 2015 20:26
Use integral type (int, long, long long) or set precision in output format string printf("%0.0lf",a+b);
Re: Please help me to find the error
Posted by Chen 6 Jun 2015 16:58
just use the integer