---
title: "Discussion on \"Exercise Chapter 3 in The Book of Rust\" | Hashnode"
description: "Discussion on \"Exercise Chapter 3 in The Book of Rust\". Exercise 1: Convert temperatures between Fahrenheit and Celsius.\n\nfn f_to_c(degree: i32) -> i32{\n    ((degree as f64 - 32.) * 5. / 9.).round() as i32\n}\nfn c_to_f(degree: i32) -> i32{\n    (degree as f64 / 5. * 9. + 32.).round() as i32\n}\n\nExercise 2: G..."
url: "https://hashnode.com/posts/exercise-chapter-3-in-the-book-of-rust/6008fa7977d8da2629c94bc6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Exercise Chapter 3 in The Book of Rust](https://kaisei.hashnode.dev/exercise-chapter-3-in-the-book-of-rust?utm_source=hashnode&utm_medium=feed)

Exercise 1: Convert temperatures between Fahrenheit and Celsius. fn f\_to\_c(degree: i32) -> i32{ ((degree as f64 - 32.) \* 5. / 9.).round() as i32 } fn c\_to\_f(degree: i32) -> i32{ (degree as f64 / 5. \* 9. + 32.).round() as i32 } Exercise 2: G...

Jan 21, 2021 · 2 min read · kaisei.hashnode.dev  
Read the article

-   [#rust](https://hashnode.com/tag/rust)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Kaisei Waki](https://hashnode.com/@kaisei)

@kaisei

  
[View profile](https://hashnode.com/@kaisei)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
