subject

Cerință Policarp e foarte bogat. Este atât de bogat încât tot ce știe despre averea lui este că valoarea ei e un număr format dintr-un 1 urmat de X de 0. Dându-se numărul natural X, să se afișeze valoarea averii lui Policarp.

Date de intrare
Se citește numărul X.

Date de ieșire
Se afișează valoarea averii lui Policarp.

Restricții
X este un număr natural mai mic decât 100.
Exemplu
Date de intrare Date de ieșire
4 10000

si eu am facut
#include
using namespace std;
int x, a = 1, ca;
int main() {
cin >> x;
if (x <= 9) {
while (x <= 9 && x != 0) {
a *= 10;
--x;
}
cout << a << endl;
} else if (x > 9) {
ca = 1000000000;
while (x != 9) {
--x;
ca =ca * 10;
}
cout << ca << endl;
} else if (x == 1)
cout << "10";
}

dar nu merge atunci cand pun 10 sau mai mult unde am gresit?

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, ilovepickles930
What can tanya do now to start preparing for the college and scholarship application process? think about her grades, activities in which she can get involved, possible part-time jobs at which she can work, and standardized tests she can take. (10 points) apex
Answers: 2
image
Computers and Technology, 22.06.2019 22:00, delawdermia27
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. the highest speed measured was 78.1 mbps. the complete list of 50 data speeds has a mean of x overbarequals16.11 mbps and a standard deviation of sequals18.65 mbps. a. what is the difference between carrier's highest data speed and the mean of all 50 data speeds? b. how many standard deviations is that [the difference found in part (a)]? c. convert the carrier's highest data speed to a z score. d. if we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant? a. the difference is nothing mbps.
Answers: 3
image
Computers and Technology, 23.06.2019 21:00, shyshy1791
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, summerjoiner
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
You know the right answer?
Cerință Policarp e foarte bogat. Este atât de bogat încât tot ce știe despre averea lui este că val...

Questions in other subjects:

Konu
Biology, 12.12.2019 05:31