SHARE
TWEET

Untitled

a guest Oct 24th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let mut checksum = 0;
  3.  
  4.     "N66555 G1 X131.338 Y133.349 E0.0091".chars().for_each(|c| {
  5.         let mut buf = [0u8; 4];
  6.         c.encode_utf8(&mut buf).bytes().for_each(|b| checksum ^= b);
  7.     });
  8.  
  9.     println!("{}", checksum);
  10. }
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