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 1293. Eniya

shailendrasky what's wrong with this code.....???? [5] // Problem 1293. Eniya 20 Dec 2013 22:02
#include<stdio.h>
#include<math.h>
int main()
{
    int  n;

    printf("%d\n",scanf("%d",&n)*n*scanf("%d",&n)*n*scanf("%d",&n)*n*2);
}
you write so complex, the answer is N*A*B*2
Fardayek Re: what's wrong with this code.....???? [2] // Problem 1293. Eniya 30 Aug 2016 00:25
why so complex man!!
ToadMonster Re: what's wrong with this code.....???? // Problem 1293. Eniya 30 Aug 2016 12:56
Should it work at all? Isn't it unspecified behavior - n is modified 3 times in the same expression?
MD.KHALED JUBAIR SHIHAB Re: what's wrong with this code.....???? // Problem 1293. Eniya 26 Nov 2017 11:56
Brother, you should solve it step by step!Don't do all things in printf function.In this way u can easily find you bug!
Md Shah Alam Re: what's wrong with this code.....???? // Problem 1293. Eniya 13 Dec 2018 08:23
You can follow this method n*a*b*2