Browse Source

Implemented fn square()

Lorenz Bung 8 years ago
parent
commit
5b831bb45a
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      hw1/task2/src/lib.rs

+ 2
- 2
hw1/task2/src/lib.rs View File

1
 pub fn square(n: u32) -> u64 {
1
 pub fn square(n: u32) -> u64 {
2
-    unimplemented!()
2
+    println!(n)
3
+    n * n
3
 }
4
 }
4
 
5
 
5
 
6
 
6
 pub fn total() -> u64 {
7
 pub fn total() -> u64 {
7
-    unimplemented!();
8
 }
8
 }

Loading…
Cancel
Save