Skip to content

Instantly share code, notes, and snippets.

View venu-stack's full-sized avatar

Venu Borra venu-stack

View GitHub Profile
@venu-stack
venu-stack / playground.rs
Created February 26, 2025 07:44 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use std::io;
fn patterns()->i32{
println!("please enter your age:");
let mut age = String::new();
io::stdin().read_line(&mut age).expect("invalid input");
let age_num:i32=match age.trim().parse(){
Ok(num)=>num,
Err(_)=>{
println!("no input");