Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
java_code
作成日
6 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
37 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
22 行
すべてコピー
37 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
23 行
すべてコピー
コピー
コピー済み
コピー
コピー済み
import java.util.*;
import java.util.*;
public class Main
{
public class Main
public static void main(String[] args)
{
{
Scanner sc = new Scanner(System.in);
public static void main(String[] args)
System.out.println("Input the radius of coin");
{
double rad = sc.nextDouble();
Scanner sc = new Scanner(System.in);
System.out.println("Input the thickness of coin");
System.out.println("Input the radius of coin");
double thick = sc.nextDouble();
double rad = sc.nextDouble();
System.out.println("Input the target distance of coin");
System.out.println("Input the target distance of coin");
double dist = sc.nextDouble();
double dist = sc.nextDouble();
double no_of_blocks
= 0;
double length
= 2 *
rad;
double no_of_blocks
=0.0;
double curr_length=0.0;
double length
=2*
rad;
double n=1
;
double curr_length=0.0;
while(curr_length
<
dist)
{
double n=1
.0;
no_of_blocks+
=1;
while(curr_length
<
dist)
{
curr_length = curr_length + (length*(1/(2*n)));
no_of_blocks+
+;
n+=1;
curr_length = curr_length + (length*(1/(2*n)));
}
n++;
System.out.println("Number
of blocks required are
: " +
no_of_blocks);
}
}
System.out.printf("NO
of blocks required are
%d" , (int)
no_of_blocks);
}
}
}
保存された差分
原文
ファイルを開く
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Input the radius of coin"); double rad = sc.nextDouble(); System.out.println("Input the thickness of coin"); double thick = sc.nextDouble(); System.out.println("Input the target distance of coin"); double dist = sc.nextDouble(); double no_of_blocks = 0; double length = 2 * rad; double curr_length=0.0; double n=1; while(curr_length < dist) { no_of_blocks+=1; curr_length = curr_length + (length*(1/(2*n))); n+=1; } System.out.println("Number of blocks required are: " + no_of_blocks); } }
変更されたテキスト
ファイルを開く
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Input the radius of coin"); double rad = sc.nextDouble(); System.out.println("Input the target distance of coin"); double dist = sc.nextDouble(); double no_of_blocks=0.0; double length=2*rad; double curr_length=0.0; double n=1.0; while(curr_length<dist){ no_of_blocks++; curr_length = curr_length + (length*(1/(2*n))); n++; } System.out.printf("NO of blocks required are %d" , (int)no_of_blocks); } }
違いを見つける