+ 3
What is wrong in this simple program.
x = input("Enter a number to check odd or even") if (x % 2) == 1: print (" x is an odd number) else: print(" x is an even number")
4 odpowiedzi
+ 16
Here is the right Python code:
x = int( input("Enter a number to check odd or even\n") )
if ( x % 2) == 1:
print (" x is an odd number")
else:
print(" x is an even number")
+ 4
You need to close the first print with double quotes (")
+ 3
First error:
x=int(input(" enter ..")
Instead of using directly input function..
Second:
string in the 1st print statemwnt is not enclosed within double inverted commas.
+ 1
What is wrong in this c++ program .
#include <iostream>
using namespace std;
int main()
{
int x[2][2][3] ={
{{1,2,3},
{4,5,6}}
{{7,8,9},
{10,11,12}}
};
cout<<x[0][1][2]<<endl;
return 0;
}