Task with percentages

  • 3
  • Locked
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.
You can't complete this task, because you're not signed in.
Comments (20)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Sai babu
Level 10 , India, India
23 August 2021, 12:23
return i*1.1;
Anonymous #10760185
Level 4 , United States of America
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.
sergio
Level 7 , Colorado, United States
19 September 2020, 22:29
i always get the feeling the lesson did not cover the problem i am trying to solve. ????
Yahya
Level 8 , Al Jubayl, Saudi Arabia
24 December 2019, 10:56
10/100 = 0 as its an integer operation. Try 10.0/100
Vicks
Level 4 , Mumbai, India
26 September 2019, 05:55
/* Comment has been deleted */
Roman
Level 41
26 September 2019, 09:18
Posting the solution in the comments is prohibited.
Bob Junior Bastien
Level 3 , Columbus, United States
23 August 2019, 23:39
the logic is :double b=i*1.1;
11 December 2019, 18:34
THANK YOU, BOB!
Lumo
Level 15 , Chisinau, Moldova, Republic of
11 June 2019, 11:16
If you want to add percentage: for example 400+9% is the same as 400*1.09 .
TUSHAR SHUKLA
Level 3 , Roorkee, India
3 June 2019, 05:05
/* The comment was deleted */
Roman
Level 41
3 June 2019, 06:26
Posting the solution in the comments is prohibited.
Mike McKenna
Level 25 , Wilmington, United States
19 May 2019, 15:42
Hi isn't this odd look at end of print statement (add Ten percent (9)); ?
Дмитрий Бувалец
Level 3 , Kropyvnytskyi, Ukraine
12 March 2019, 08:37
/* The comment was deleted */
Roman
Level 41
13 March 2019, 07:08
Posting the solution in the comments is prohibited.