0

Please I do not have any idea how to solve this problem

https://www.sololearn.com/coach/4?ref=app I am a beginner.,Thank you.

13th Apr 2020, 8:08 PM
Amal Gil
Amal Gil - avatar
30 Answers
+ 1
It simple, you have two houses are giving out dollar bills, and suppose the number of houses that you visited is (n). Therefore the porcentage of one random item pulled from your bag is a dollar bill it 2/n*100=> 200/n ....āœŒ
13th Apr 2020, 9:53 PM
Amine Laaboudi
Amine Laaboudi - avatar
+ 3
Big upšŸ‘ scanf("%d", &h); int a=200/h; if(200%h) a++; printf("%d",a);
13th Apr 2020, 9:32 PM
Amine Laaboudi
Amine Laaboudi - avatar
+ 2
math import ceil houses = int(input()); prc= ceil((2 * 100) / houses); printf(prc);
15th Apr 2020, 4:36 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
#include <stdio.h> int main() { int h, a; scanf("%d", &h); //h=number of houses //a= Probability of getting doller bills //your code goes here a=100-(h-2)*100/h; printf ("%d",a); return 0; } // I think it will be helpful to you šŸ™‚
15th Apr 2020, 10:41 AM
Suraj Kumar
Suraj Kumar - avatar
+ 2
show my page
15th Apr 2020, 10:57 AM
šŸ’”Arno Gevorgyan šŸ
šŸ’”Arno Gevorgyan šŸ - avatar
+ 2
TheĀ <applet>Ā tag in HTML was used toĀ embed Java applets into any HTML document. TheĀ <applet>tag was deprecated in HTML 4.01, and itā€™s support has been completely discontinued starting from HTML 5. Alternatives available in HTML 5
15th Apr 2020, 4:45 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Try this houses = int(input()) import math percent = math.ceil( 2 * 100 / houses ) print ( percent )
15th Apr 2020, 10:01 AM
Selva Kumar
0
Simple arithmetic problem. You have to learn first how If else Works.
13th Apr 2020, 8:38 PM
Shafiqur Rahman
0
Yes for sure I gonna use the if else statement but I don't have any idea about the conditions Thank you busydev.
13th Apr 2020, 8:46 PM
Amal Gil
Amal Gil - avatar
0
But please why exactly 200
13th Apr 2020, 9:33 PM
Amal Gil
Amal Gil - avatar
0
Or you can use ciel() easily but it stell work anyway
13th Apr 2020, 9:37 PM
Amine Laaboudi
Amine Laaboudi - avatar
0
Ciel()??is this a function?
13th Apr 2020, 9:52 PM
Amal Gil
Amal Gil - avatar
0
Okay I get you now. Thanks
13th Apr 2020, 9:56 PM
Amal Gil
Amal Gil - avatar
0
You're welcome
13th Apr 2020, 9:58 PM
Amine Laaboudi
Amine Laaboudi - avatar
0
If (200/h)=if(200/h!=0)??
13th Apr 2020, 10:14 PM
Amal Gil
Amal Gil - avatar
0
I mean ceil() in math header file...
13th Apr 2020, 10:15 PM
Amine Laaboudi
Amine Laaboudi - avatar
0
Oui les deux expression sont equivalent
13th Apr 2020, 10:16 PM
Amine Laaboudi
Amine Laaboudi - avatar
0
Ah d'accord mais est ce qu'il est nƩcessaire d'utiliser la fonction ciel. Pardon mais j'ai aucune idƩe Ơ propos de cette fonction
13th Apr 2020, 10:21 PM
Amal Gil
Amal Gil - avatar
0
Non,non ce n'est pas nƩcessaire
13th Apr 2020, 10:25 PM
Amine Laaboudi
Amine Laaboudi - avatar
0
Alright. Thank so much for your help
13th Apr 2020, 10:31 PM
Amal Gil
Amal Gil - avatar