If you weren't afraid of problems with percentages in school, then this problem won't scare you either. But if you do suddenly find yourself afraid, it's time to face your fear and realize that this is actually a simple and pleasant topic. Let's implement a method that increases the passed integer by 10 percent.
Task with percentages
- 3
Locked
Comments (20)
- Popular
- New
- Old
You must be signed in to leave a comment
Sai babu
23 August 2021, 12:23
return i*1.1;
+1
Anonymous #10760185
18 July 2021, 13:47
I got the answer multiple ways but it would only pass 3 out of 4 until I read the comments and then figured out the formula on my own. I will say this , use a double and then use a decimal point in your 10/100 portion of your code.
0
sergio
19 September 2020, 22:29
i always get the feeling the lesson did not cover the problem i am trying to solve. ????
+1
Yahya
24 December 2019, 10:56
10/100 = 0 as its an integer operation. Try 10.0/100
+1
Vicks
26 September 2019, 05:55
/* Comment has been deleted */
0
Roman
26 September 2019, 09:18
Posting the solution in the comments is prohibited.
0
Bob Junior Bastien
23 August 2019, 23:39
the logic is :double b=i*1.1;
+1
hidden #10566897
11 December 2019, 18:34
THANK YOU, BOB!
0
Lumo
11 June 2019, 11:16
If you want to add percentage: for example 400+9% is the same as 400*1.09 .
+1
TUSHAR SHUKLA
3 June 2019, 05:05
/* The comment was deleted */
0
Roman
3 June 2019, 06:26
Posting the solution in the comments is prohibited.
0
Mike McKenna
19 May 2019, 15:42
Hi
isn't this odd look at end of print statement (add Ten percent (9)); ?
0
Дмитрий Бувалец
12 March 2019, 08:37
/* The comment was deleted */
0
Roman
13 March 2019, 07:08
Posting the solution in the comments is prohibited.
0