Generation

generate functionWed, 30 Nov 2022

Render a triangle

fn main() { let triangle_base: u32 = 5; let triangle_height: u32 = 2; let triangle_area: u32 = triangle_base * triangle_height / 2; println!("The area of a triangle with base {} and height {} is {}", triangle_base, triangle_height, triangle_area); }

Questions about programming?Chat with your personal AI assistant