Java Program To Check a Number is Prime or Composite

Task:Write a Java Program To Check a Number is Prime or Composite The Source code for Java Program to input a number and check whether it is prime number or composite /* Write a Java program to input a number and check it whether it is prime or composite number. */ package primenocheck; /** *… Read More: Java Program To Check a Number is Prime or Composite »

Loading

Java Program to Calculate Area of Circle

Task: Java Program to Calculate Area of Circle What is the formula for calculating Area of Circle? The required formula for calculating area of circle is: area = π . r2 Where r is the radius of the circle and π  is a mathematical constant with fixed value 3.1415. We should declare a constant for pi… Read More: Java Program to Calculate Area of Circle »

Loading

Java Program To Input a Number and Display Its Square

Task: Write a Java Program To Input a Number and Display Its Square. The sample run of the required Java program is shown in the image below: Stop Here, Please, Click to Read : Getting input from keyboard in Java, first For getting input in a Java program, we may use the Scanner class. Please… Read More: Java Program To Input a Number and Display Its Square »

Loading

Get Keyboard Input in Basic Java Program

Task: Steps to Get Keyboard Input in Basic Java Program The Input For Java Console Applications ( Basic Java Programs ) Java Console Applications are the basic programs to start learning Java Programming Language. The new Java programmers wish to write general programs with run time input from the user. For example, suppose  we wish… Read More: Get Keyboard Input in Basic Java Program »

Loading

Write and Execute First Java Program in NetBeans

Task: How To Write and Execute First Java Program in NetBeans IDE. Note: In this Simple Java Tutorial we will assume that you have already downloaded and installed Java Development Kit JDK and Net Beans 8.1 IDE or higher. Short Steps: Step 1: Start Net Beans IDEStep 2: Now you will Click on File menu… Read More: Write and Execute First Java Program in NetBeans »

Loading

C Program To Calculate Circumference of Circle

Q: Write a C Program To Calculate Circumference of Circle. Input radius of the circle from the user at run time. Use the formula: circumference of circle = 2 * PI * radius The Logic Behind C Program to Find Circumference of Circle This is a simple C program using formula calculation technique. The basic… Read More: C Program To Calculate Circumference of Circle »

Loading

C Program to Search Multiple Records of Given Name in Binary File

Q: Write down a C Program to Search Multiple Records of Given Name in Binary File. As we have seen earlier a simple version of this program to search the first record with given name in a binary file. This program will show all such records having the given name of student in a binary… Read More: C Program to Search Multiple Records of Given Name in… »

Loading

C Program to Find Smallest Number in Array

Q: Write a C Program to Find Smallest Number in Array The Basic Logic of Smallest Number in Array Program First of all the user will input any 5 numbers in array. The program assumes that the first number is minimum number min = numArray[0]; This C program uses a for loop to get each… Read More: C Program to Find Smallest Number in Array »

Loading

C Program to Find Largest Number in Array

Q: Write a C Program to Find Largest Number in Array. The Basic Logic Behind Finding Maximum Number in Array First of all the user will input any 5 numbers in array. The program assumes that the first number is maximum number max = numArray[0]; This C program uses a for loop to get each… Read More: C Program to Find Largest Number in Array »

Loading

C Program to Check Positive Negative or Zero

Topic: C Program to Check Positive Negative Q: Write a C Program to use simple if statement to check positive negative or zero How to check for positive number A number is positive if it is greater than 0 (zero). Use simple if statement. if (number > 0) printf(“Number is positive”); What is the condition… Read More: C Program to Check Positive Negative or Zero »

Loading