int main () { int x; printf ("Enter the value of x\n"); scanf ("%d",&x); if (0 == x%2) printf ("Number is even\n") else printf ("Number is odd\n"); }
for(int i = 1; i < 100; i+=2) { System.out.println(i); }
No, thanks.
Yes, do write, or if you're too lazy to your homework, use google.
Yes, do write. That's what you always have to do when you have got a homework-program.
The pseudo code would be as follows (you figure out the syntax) 1) Prompt the user to enter a number 2) If entered number is alpha, quit program after displaying message that the user ended the program. 3) Otherwise, find Modulo 2 of the entered number. This is a fancy way of saying "find the remainder when the number is divided by 2) 4) If Modulo 2 is zero, the number is even, otherwise odd 5) Display message showing if the entered number was Even or Odd 6) Branch back to step 1
for(int i = 1; i < 100; i+=2) { System.out.println(i); }
No.
No, thanks.
Yes, do write, or if you're too lazy to your homework, use google.
Write a C program called MonthDays to find the number of days in a given month Test your code with different input values to demonstrate that your function is robust?
Check the documentation of the String class, for a method that searches for a substring.
write a vb program to find the magic square
You basically write a nested for loop (one for within another one), to copy the elements of the matrix to a new matrix.
For first find an example program.
Write a program to find the grade obtained by the students of a class
You find a language that can be targeted towards the .NET Framework. What you are suggesting is something related to string manipulation and you can work with delimiters.
Yes, do write. That's what you always have to do when you have got a homework-program.