How to solve this question?

1 次查看(过去 30 天)
Hong Yee Ooi
Hong Yee Ooi 2019-6-26
You are required to write a script to add two ten-digit random integer and print the result. Use
for-loop and if-else in your script.

回答(1 个)

gonzalo Mier
gonzalo Mier 2019-6-26
Oh, a really interesting problem. Lets try to solve it as easy as possible...
Lets propose some ideas:
  1. Sum two constant numbers in a for loop and when your teacher asks, just tell him you use a normal very thin.
  2. Use the function randsample(prime(899999999)+100000000,1) to obtain each of the random values.
  3. Record your voice and pick some values from there.
  4. Plot the values as string in a plot ui.
  5. Or better, plot one of each number in a different subplot.
  6. Even better, codify each value as different shape form that has as many sides as your number. Remenber, you don't need to make all the sides equal.
121411_1611_SecureRando1.png

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by