EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

Java stack sum of element program

class Customizedstack { private int arr[];//Array to store stack elements private int top; //acts as a cursor for stack private int capacity;//maximum size of stack   Customizedstack(int size)//5 { capacity=size;//5 arr=new int[capacity];//0-4 top=-1; }   public void push(int value)//10 { if(top==capacity-1)//4 { System.out.println(“stack is overflow”); } else { arr[++top]=value; }   }   public int […]

Java Reserved Keywords

Java Reserved Keywords: Java has a set of keywords that are reserved words that cannot be used as variables, methods, classes, or any other identifiers. For example: break, char, double, final Literal: Any constant value which can be assigned to the variable is called literal/constant. Literals in Java is a synthetic representation of boolean, numeric, […]

Calculating marks by using java

class Marks { public static void main(String args[]) { int m1,m2,m3,m4,m5,total; float avg; System.out.println(“enter 5 marks”); Scanner s=new Scanner(System.in); m1=s.nextInt(); m2=s.nextInt(); m3=s.nextInt(); m4=s.nextInt(); m5=s.nextInt(); total=m1+m2+m3+m4+m5; avg=total/5; System.out.println(“Total=”+total); System.out.println(“Average=”+avg); if(m1>=35 && m2>=35 && m3>=35 && m4>=35 && m5>=35) { System.out.println(“Result=pass”); if(avg>=90 && avg<=100) { System.out.println(“Grade A”); } else if(avg>=80 && avg<=89) { System.out.println(“Grade B”); } else […]

Calculating marks by using java program

If a marks obtained by a student in 5 different subject are input through the keyboard. Find out the total marks and percentage obtained by a student ————————————— import java.util.Scanner; public class StudentMarks { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // Array to store marks of 5 subjects int[] marks […]

EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

Popular Courses

[Course Image]

Introduction to Programming

Learn the fundamentals of programming with Python in this beginner-friendly course.

12 Hours Beginner
[Course Image]

Data Science Essentials

Master the basics of data analysis, visualization, and machine learning.

20 Hours Intermediate
[Course Image]

Web Development Bootcamp

Build modern websites with HTML, CSS, JavaScript and popular frameworks.

30 Hours Beginner
[Course Image]

Digital Marketing Fundamentals

Learn SEO, social media marketing, email campaigns and analytics.

15 Hours Beginner
Educational Website Footer