#include <stdio.h> int main() { int x=1,n; printf("Enter n value "); scanf("%d",&n); while(x<=n) { if(x%2==0) { printf("%d\n",x); } x++; } return 0; }
Enter n value 20 2 4 6 8 10 12 14 16 18 20
Apply For Job
Java Material
Python Material
PLSQL Material
.Net Material
Java Practice Programs
400 Java Programs
Write a Java program to print the even numbers from 1 to 20
Write a Program to Find largest and smallest number in an array in java
Write a Java Program to find Armstrong number
Write a Java program that accepts an integer (n) and computes the value of n+nn+nnn
Write a Java program that takes two numbers and display the product of two numbers
Write a Python program to get n (non-negative integer) copies of the first 2 characters of a given string. Return n copies of the whole string if the length is less than 2.
Write a python program to display list of numbers and we want to return all the numbers from the list that are divisible by 2 and remove duplicates at the same time.
Write a Python program to test whether a passed letter is a vowel or not.
Write a Python Program to Check Leap Year.
Write a Python program to convert kilometers to miles.
Java Quiz - 20
Java Quiz - 19
Java Quiz - 2
Java Quiz - 10
Java Quiz - 12