Copycat

@SirajBoss You will have to follow the output specification accurately. You must not print anything extra.

Remove the first printf (printf("Enter a number:");) and remove the extra text from the second printf (printf("Your number is: %d",a);printf("%d",a);).

1 Like

Thank you Brother. All problem solved.

1 Like
import java.util.Scanner;
public class Solution {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println(in.nextInt());
    }
}

whats wrong with this code ?? compilation error why ?

@gogleprogramer If you are using the IDE, please rename the class to “solution” (with a lowercase s).

#include<iostream>
using namespace std;
int main()
{
[REDACTED]
  return 0;
  }

2 posts were split to a new topic: [Dimik OJ] Problem 6

Why is does it keep showing “Compilation Error”?

It seems you are submitting C code as C#. C# is a different programming language. What you should choose instead is C11.

1 Like

@hjr265…Thank U very much

1 Like

how to solve this problem in php? i am submit the problem, first test case is accepted but second test case showing wrong answer

Looks like you have solved it.

#include <stdio.h>

int main()
{
int A;
scanf(“%d”,&A);
printf(“%d”,A);
return 0;
}
What’s wrong with this code?Showing compilation error

What’s wrong with the submit; It always shows me wrong. Is it necessary to match all the lines and letters with your solutions? There are several methods of fixing that problem. I can’t still find where is the problem. Here’s my code block

while True:
try:
    user_input = input("Number: ")
    converted_input = int(user_input)
    output = 0  # dummy value
    if converted_input < 200000000:
        output = converted_input
        print(output)
        break
    else:
        print("Input can't be bigger than 200000000")
        continue

except ValueError:
    print("Invalid input. Please try again.")
#include <stdio.h>
#include <stdlib.h>

int main()
{
   int number;
   printf("Enter your number: ");
   scanf("%d",&number);
   printf("%d",number);

    return 0;
}

Which programming language is this?
I know this is C .
But in submission there is no option of C.

#include <stdio.h>
#include <stdlib.h>

int main()
{
int number;
printf(“Enter your number: “);
scanf(”%d”,&number);
printf(“%d”,number);

return 0;

}
Which programming language is this?
I know this is C .
But in submission there is no option of C.
Tell me someone plz/

#include <stdio.h>
#include <stdlib.h>

int main()
{
   int number;
   printf("Enter your number: ");
   scanf("%d",&number);
   printf("%d",number);

    return 0;
}

In which programming language I should submit this?

C11 GCC9.2
And bro ur code will not be accepted since u are using extra things like “enter your number”.
remove them.your output should come as given in the question.

how can I solve it in python 3.8?

python 3.8

[REDACTED]

a = input("") can be written without the quotes.

1 Like