-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone

Description
1 import io::;
2 import core::;
3 fn main(){
4 let price;
5
6 let item = io::stdin().read_line();
7
8 if str::eq(item,"salad"){
9 price = 3.5;
10 }else if str::eq(item,"kiwie"){
11 price = 2.25;
12 }else{
13 price = 5.0;
14 }
15
16 io::println(#fmt("%f",price));
17 }
I used to develope with C but there is a function "strcmp" but here. I don't know which I can use comparing the string..
Let me know them how to use.
Also I'd like to know about how to use API document properly. I can find and see the function and some kind of that. But I don't know how to use exactly
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.