Monthly Archives: July 2019

Copy All Records to Another File Program in C Plus Plus

Task: Copy All Records to Another File Program in C Plus Plus This program will open the source file in reading ( in ) mode. It will open the destination file in writing (out) mode. Then the program will read all records from source file one by one. And copy every record to destination file.… Read More: Copy All Records to Another File Program in C Plus… »

Loading

Menu Driven C++ Program To Read and Write in Binary File

Task: Menu Driven ( C++ ) C Plus Plus Program To Read and Write in Binary File. How This C++ File Program Works? This C++ program uses a menu driven approach. It displays a menu on screen as follows: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + Menu + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 1. Add Records of Students in File + + 2.… Read More: Menu Driven C++ Program To Read and Write in Binary… »

Loading

C ++ Program To Display All File Records

Task: Write a (C++) C Plus Plus Program To Read and Display All Records from a Binary File. The source code of C Plus Plus Program To Read and Display All Records from a Binary File /* Write a C Program to read and display all records from an existing binary file */ #include<iostream> #include<fstream>… Read More: C ++ Program To Display All File Records »

Loading

Java Program Area of Triangle by Three Sides

Task: Write a Java Program Area of Triangle by Three Sides. The Source Code of Java Program Area of Triangle by Three Sides /* * Write a Java program to find the area of a triangle when lengths of three sides are given. */ package trianglearea; import java.util.Scanner; /** * @author www.EasyCodebook.com */ public class… Read More: Java Program Area of Triangle by Three Sides »

Loading

Fibonacci Program in Java to print n terms

Task: Write a Fibonacci Program in Java to print n terms of Fibonacci series. The user will input the number of Fibonacci terms to print, at run time. Use Scanner class of java.util to get input from user through key board. The Source code of Fibonacci Program in Java to print n terms   /*… Read More: Fibonacci Program in Java to print n terms »

Loading

Java Array Program Implement Linear Search Algorithm

Task: Write a Java Array Program Implement Linear Search Algorithm. Input 10 numbers in array. Input a number to search in the array. Find index of this item in array of 10 integers. The source code for Linear Search program using array in Java programming Language: /* * Write a Java program to Search an… Read More: Java Array Program Implement Linear Search Algorithm »

Loading

Java Array Program to Find Sum of Even Numbers in Array

Task: Write a Java Array Program to Find Sum of Even Numbers in Array. This Java program uses a simple mathematical logic to check whether an array item ( that is number ) is even. The idea is to divide a number by two and obtain remainder. If remainder is a zero then the given… Read More: Java Array Program to Find Sum of Even Numbers in… »

Loading

Java Array Program to Print Odd Numbers in Array

Task: Write a Java Array Program to Print Odd Numbers in Array. This Java Array program uses simple logic to check whether number is odd. It will divide a number with 2 and get remainder of division using % arithmetic operator. Therefore, if the remainder is a 1, the number will be odd. The Source… Read More: Java Array Program to Print Odd Numbers in Array »

Loading