Skip to content

Create Pascal's triangle#84

Open
AKKATINITHISHREDDY wants to merge 1 commit intorustindia:masterfrom
AKKATINITHISHREDDY:patch-1
Open

Create Pascal's triangle#84
AKKATINITHISHREDDY wants to merge 1 commit intorustindia:masterfrom
AKKATINITHISHREDDY:patch-1

Conversation

@AKKATINITHISHREDDY
Copy link

No description provided.

let mut r=String::new();
io::stdin().read_line(&mut r).expect("");
let mut rows: i32;
rows=r.parse().unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trim whitespaces before parsing.

rows=r.trim().parse().unwrap();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments