---
title: Raise a number to a power in Rust
timestamp: 2023-10-03T07:15:01
author: szabgab
published: true
description: Raise a number to a power
tags:
    - pow
---

We need to explicitely define the type of the base. We can do it by the type annotation `: u128` or using the type suffix `_u32`.

Then we use the `pow` function.

{% include file="examples/raise-to-power/src/main.rs" %}

