Skip to content

Instantly share code, notes, and snippets.

@xelemental
Created December 13, 2021 15:01
Show Gist options
  • Save xelemental/a53ca5607f6253584a1536ef8a22f1f5 to your computer and use it in GitHub Desktop.
Save xelemental/a53ca5607f6253584a1536ef8a22f1f5 to your computer and use it in GitHub Desktop.
fn main(){
about1("Rohan", 20, "PowerPC");
about2("Kumar", "ARM");
about3("Rohit", "India");
fn about1(value : &str, age: u64, processor_choice: &str){
println!("{} is {} and he is a {} enthusiast", value, age, processor_choice);
}
fn about2(value: &str, processor_choice : &str) {
println!("{} is an {} enthusiast", value, processor_choice);
}
fn about3(value: &str, country: &str){
println!("{} is from {}", value, country)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment