cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Program

KM_10683856
3-Visitor

Program

Hi. Im kinda new here at mathcad and I am bad at programming, I am still trying to use the program part of mathcad, how can i program mathcad to generate 3 random numbers from 1-100?

I just want to start with something simple at first. 

Thank you.

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

In such a case, you can use the round function:

 

Pic_2.png

 

 

"Example: Truncation and Roundoff Functions": https://support.ptc.com/help/mathcad/r9.0/en/PTC_Mathcad_Help/example_truncation_and_roundoff_functions.html

View solution in original post

5 REPLIES 5

how do i make it an whole integer?

In such a case, you can use the round function:

 

Pic_2.png

 

 

"Example: Truncation and Roundoff Functions": https://support.ptc.com/help/mathcad/r9.0/en/PTC_Mathcad_Help/example_truncation_and_roundoff_functions.html

but what if I want a non-repetitive random number?

also, what if I want a combination or a permutation?

 

With the programming block, you can do whatever you want: "About the Programming Tutorial": https://support.ptc.com/help/mathcad/r9.0/en/index.html#page/PTC_Mathcad_Help/Tutorials/prgm_tutorial/about_the_programming_tutorial.html 

Top Tags