Online Code Compiler

フリーミアム
よって Glavier | 更新済み לפני חודשיים | Tools
人気

9.5 / 10

レイテンシー

2,145ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

Output Restrictions

Rapid account: Vigneshwarans
vigneshwarans
לפני 9 חודשים

import java.util.*;
class UserInputDemo
{
public static void main(String[] args)
{
Scanner sc= new Scanner(System.in);
System.out.print("Enter first number- ");
int a= sc.nextInt();
System.out.print("Enter second number- ");
int b= sc.nextInt();
System.out.print("Enter third number- ");
int c= sc.nextInt();
int d=a+b+c;
System.out.println("Total= " +d);
}
}
“This is my sample code, and I received output with System.out prompts like ‘Enter first number-’, ‘Enter second number-’, and ‘Enter third number-’. Is there any way to suppress these prompts, so I receive only the output result without the prompts?”

Actual Output:

output: Enter first number- Enter second number- 'Enter third number- 5

Expected Output:

output: 5

Rapid account: Glavier
Glavier Commented לפני 8 חודשים

Sorry for the errors, the problem has been fixed.

Rapid account: Vigneshwarans
vigneshwarans Commented לפני 8 חודשים

"Your request seems invalid. Please try to execute again.\n\nIf the problem persists, please try the below solutions: \na) refresh the page \nb) clear the cache \nc) login\nd) try in incognito mode\ne) contact support - "

— can you tell me the exact issue, because my clients are using Code compiler , so they’re asking for the reason?! that’s why I asked.

Thanks Inadvance.

Rapid account: Vigneshwarans
vigneshwarans Commented לפני 9 חודשים

THANK YOU!! Could you suggest an alternate solution, like if I don’t use ‘sysout,’ and how can I get the expected output? Thanks in advance.

sysout is mandatory to get output?

Rapid account: Glavier
Glavier Commented לפני 9 חודשים

This is related to your coding and unfortunately we cannot provide support on this issue.

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿