This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// メイン関数 | |
/// 標準入力を求め、入力された文字にビックリマークをつけて返す | |
pub fn main() { | |
let mut s = String::new(); | |
std::io::stdin().read_line(&mut s).ok(); | |
println!("{}", public_function(s.trim().parse().ok().unwrap())); | |
} | |
/// これはパブリックな関数 | |
/// 渡された文字列の後ろにビックリマークをつけて返す |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// メイン関数 | |
/// 標準入力を求め、入力された文字にビックリマークをつけて返す | |
pub fn main() { | |
let mut s = String::new(); | |
std::io::stdin().read_line(&mut s).ok(); | |
println!("{}", public_function(s.trim().parse().ok().unwrap())); | |
} | |
/// これはパブリックな関数 | |
/// 渡された文字列の後ろにビックリマークをつけて返す |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// メイン関数 | |
/// 標準入力を求め、入力された文字にビックリマークをつけて返す | |
pub fn main() { | |
let mut s = String::new(); | |
std::io::stdin().read_line(&mut s).ok(); | |
println!("{}",public_function(s.trim().parse().ok().unwrap())); | |
} | |
/// これはパブリックな関数 | |
/// 渡された文字列の後ろにビックリマークをつけて返す |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// メイン関数 | |
/// 標準入力を求め、入力された文字にビックリマークをつけて返す | |
pub fn main() { | |
let mut s = String::new(); | |
std::io::stdin().read_line(&mut s).ok(); | |
println!("{}",public_function(s.trim().parse().ok().unwrap())); | |
} | |
/// これはパブリックな関数 | |
/// 渡された文字列の後ろにビックリマークをつけて返す |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//クレートとしてconrodを読み込む | |
#[macro_use] extern crate conrod; | |
fn main() { | |
//featureモジュールのmain関数呼び出し | |
feature::main(); | |
} | |
/// モジュール | |
mod feature { | |
use conrod::backend::glium::glium::{self, Surface}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//クレートとしてconrodを読み込む | |
#[macro_use] extern crate conrod; | |
fn main() { | |
//featureモジュールのmain関数呼び出し | |
feature::main(); | |
} | |
//モジュール | |
mod feature { | |
//conrodで利用するものを宣言 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//クレートとしてconrodを読み込む | |
#[macro_use] extern crate conrod; | |
fn main() { | |
//featureモジュールのmain関数呼び出し | |
feature::main(); | |
} | |
//モジュール | |
mod feature { | |
//conrodで利用するものを宣言 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//クレートとしてconrodを読み込む | |
#[macro_use] extern crate conrod; | |
fn main() { | |
//featureモジュールのmain関数呼び出し | |
feature::main(); | |
} | |
//モジュール | |
mod feature { | |
//conrodで利用するものを宣言 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "calculator" | |
version = "0.1.0" | |
authors = ["自分の名前とアドレス"] | |
[dependencies.conrod] | |
version = "0.61.1" | |
features = ["glium", "winit"] | |
[dependencies] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Circle { | |
private double radius; | |
Circle(double radius){ | |
this.radius = radius; | |
} | |
public double area(){ | |
return Math.PI * (this.radius * this.radius); | |
} | |
} |
NewerOlder