1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

解いてみた。「Dランク:Eメールアドレス」

Posted at

問題

「Dランク:Eメールアドレス」

コード

Javaで解いてみました。

import java.util.*;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String sS = sc.next();
        String sT = sc.next();
        
        String sEmail = sS + "@" + sT;
        System.out.println(sEmail);
    }
}

解説

標準入力からの文字列の読み取り

Scanner インスタンスを作り、next()メソッドで文字列を取得しています。

文字列の足し算

標準入力から取得した文字列 sS と "@" と sT を足し合わせて、表示しています。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?