SHARE
TWEET

Untitled

a guest Aug 19th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn power(a : u8, x : u8) -> u8 {
  2.     let mut out : u8 = 1;
  3.     for _ in 1..=x {
  4.         out *= a;
  5.     }
  6.     return out
  7. }
  8.  
  9. fn main() {
  10.     println!("{}", power(2, 2));
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top