Java Programming Exercise 1: CBSE Board Percentage Calculator

preview_player
Показать описание
Complete Java Course Exercise 1: Percentage calculator in Java
This java tutorial in hindi will teach you how to calculate percentage in java programming. This video will be the first exercise of our java tutorial in Hindi series. Make sure to solve it and post the solutions in the comments!

Best Hindi Videos For Learning Programming:

►C Language Complete Course In Hindi -

►JavaScript Complete Course In Hindi -

►Django Complete Course In Hindi -

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

Waise JEE main ka exam kis kis ne diya is baar?
Will you solve this question?

CodeWithHarry
Автор

import java.util.Scanner;

public class Marks {
public static void main(String [] args) {

Scanner sc = new Scanner(System.in);
System.out.println("total marks of the subjects");
Float sub1 = sc.nextFloat();

Float sub2 = sc.nextFloat();

Float sub3 = sc.nextFloat();

Float sub4 = sc.nextFloat();
System.out.println("computer science");
Float sub5 = sc.nextFloat();

Float sub6 = sc.nextFloat();


Float sum =
System.out.println(sum);
float average = sum*100/600;

System.out.println("total percentage is:" + average);
}
}

sabitakhadka
Автор

Harry Bhai ye meri life ka first program hai. I'm a Automobile Engineer. Thanks you so much Bhai etni achi playlist banane ke liye

AkshayPatil-wxkz
Автор

System.out.println("Harry is brilliant");

Shauryaaaaaaaa
Автор

its been 3 years im starting it now. YO got it without a single error.

Aryas-hu
Автор

this question was really nice :)
this is my approach to the problem:

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
float total =500;
System.out.println("Enter marks for 5 subjects: ");
System.out.println("English: ");
float a = sc.nextFloat();
");
float b = sc.nextFloat();
System.out.println("Physics: ");
float c = sc.nextFloat();
");
float d = sc.nextFloat();
System.out.println("C++: ");
float e = sc.nextFloat();

float sum = a+b+c+d+e;
System.out.println("your total marks is: ");
System.out.println(sum);

float percentage = (sum/total)*100;
System.out.println("Marks Percentage is: ");

}

nikstatus
Автор

Dear Harry bhaiya,
I am student. Due to lockdown, online lecture started but I couldn't understand these coding concepts. Firstly i am very stressful about it but ur teaching clears all my doubts.
Thanks a lot and keep making these lectures😊😊😊😊

omnikam
Автор

Hello Harry bhiya, It's really an amazing course, I'm learning java as a Kickstart.
here is the solution of the exercise
import java.util.Scanner;

public class CWH_exercise_01 {
public static void main(String[] args) {
System.out.println("To calculate the percentage of a student out of 100");
Scanner sc = new Scanner(System.in);
int s1, s2, s3, s4, s5;
double percentage;
String name;

System.out.println("Enter name of the student - ");
name=sc.nextLine();

System.out.println("Enter marks of subject 1: ");
s1=sc.nextInt();

System.out.println("Enter marks of subject 2: ");
s2=sc.nextInt();

System.out.println("Enter marks of subject 3: ");
s3=sc.nextInt();

System.out.println("Enter marks of subject 4: ");
s4=sc.nextInt();

System.out.println("Enter marks of subject 5: ");
s5=sc.nextInt();



System.out.print("Percentage obtained by ");
System.out.print(name);
System.out.print(" is ");





}
}

bhargavbharadwaz
Автор

Thanks harry bhai best teacher cleared all concepts till now looking easy just because of you thanku sir again 🙏
Import Java.util.Scanner;

Public class Exercise{
Public static void main(string[ ] args){

Scanner sc = new Scanner(system.in);
System.out.println("enter marks of sub 1");
Float a = sc.nextFloat();
System.out.println("enter marks of sub 2");
Float b = sc.nextFloat();
System.out.println("enter marks of sub 3");
Float c = sc.nextFloat();
System.out.println("enter marks of sub 4");
Float d = sc.nextFloat();
System.out.println("enter marks of sub 5");
Float e = sc.nextFloat();

Float total =a+b+c+d+e;
system.out.println("total marls obtained are ");
System.out.println(total);

System.out.println("enter maximum marks of all subjects");
Long Max=sc.nextLong();


Int percentage=total*100/Max;

= ");


}
}

shrikant_
Автор

Thanks for the lectures bhaiya and this is my code :
import java.util.Scanner;
public class Exercise1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("marks obtained in maths");
float maths = sc.nextFloat();
System.out.println("marks obtained in science");
float science = sc.nextFloat();
System.out.println("marks obtained in sst");
float sst = sc.nextFloat();
System.out.println("marks obtained in english");
float english = sc.nextFloat();
System.out.println("marks obtained in odia");
float odia = sc.nextFloat();
of marks obtained in class 10 cbse exam");
float percentage = (maths + science + sst + english + odia)/500 * 100;

System.out.println(" %");
}
}

tikunlegend
Автор

Hello Dada Very Very Thankyou, Love from Kolkata ❤️

Import Java.until.Scanner;
Public Class Exercise_1 {
Public Static Void Main (Strings [ ]args){
System.out.println("Higher secondary Marks");
Scanner Sc = new Scanner (System.in);
System .out .println("Bangla");
Float a= sc.nextfloat ( );
System.out.println(English);
Float b= sc.nextfloat ();
System.out.println( Mathematics);
Float c= sc. nextFloat ();
System.out.println (Physics);
Float d= sc.nextFloat ();
System.out.println( "Biology");
Float e = sc.nextFloat();
Float Sum = a+b+c+d+e ;
Sout(Sum);
Float Total= 100*5;
Sout(Total);
Float Percentage=((Sum/Total)*100);
Sout (Percentage);
}
}

papai_kumar
Автор

Hello big Bro thank you for this Course .
Program:

import java.util.Scanner;
public class Exercise_01 {
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
float total=500;
System.out.println("Enter Marks Obtain In Five Subject:");

Float a = sc.nextFloat();

Float b = sc.nextFloat();

Float c = sc.nextFloat();

Float d = sc.nextFloat();

Float e = sc.nextFloat();

Float sum = a + b + c + d + e;
System.out.println("Your Total Marks Obtain is:");
System.out.println(sum);

Float percentage = (sum / total) * 100;
System.out.println("Final Marks Percentage is:");

}
}

iconismfx
Автор

This is my second time learning java
i learnt java when i was in 8th, 9th &10th and later cuz of jee i stopped learning java so harry's the best teacher on net
If u learn java offline its the best way to learn
Here;s my assignment
import java.util.Scanner;
public class CWH_Assignemnt
{
public static void main(String[] args)
{
Scanner ob= new Scanner(System.in);
System.out.println("Enter the marks for the 5 subjects");
int m1=ob.nextInt();
int m2=ob.nextInt();
int m3=ob.nextInt();
int m4=ob.nextInt();
int m5=ob.nextInt();
double sum=m1+m2+m3+m4+m5;
double avg=(sum/500)*100;
//double percentage=avg*100;
System.out.print("The percentage scored is: "+ avg);
//System.out.println();
}
}

_its._gaurav._
Автор

I'm learning "C" Programming language from your playlist and believe me it's incredibly amazing and super easy.
I think it's because of your teaching skills.
Harry sir amazing work.
Harry = Hard working boy

souravkumar
Автор

🙏Thanks to Code with Harry 🥰

I've rented a laptop 💻 🙃 to learn programming for 6 days because I cannot afford it to buy and i wrote my first successful code.Although screen is cracked but whatever I'm being learnt through this channel is very valuable.

shinejaiswal
Автор

Thank you so much sir for making this playlist.
YOU ARE VERY HARD WORKING FOR US.❤❤

Sir this code I make in JVDROID mobile app.

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
System.out.println("ENTER YOUR MARKS OUT OF 100");
Scanner scan = new Scanner(System.in);
System.out.println("Enter marks of subject ENGLISH");
int eng = scan.nextInt();
System.out.println("Enter marks of subject MATHEMATICS");
int math = scan.nextInt();
System.out.println("Enter marks of subject SCIENCE");
int sc = scan.nextInt();
System.out.println("Enter marks of subject ENVIRONMENT STUDIES");
int es = scan.nextInt();
System.out.println("Enter marks of subject HISTORY ");
int his = scan.nextInt();

int sum = eng + math + sc + es + his;
float per = (sum * 100) / 500f;

System.out.println("YOUR PERCENTAGE IS : " + per);

}
}

👆👆👆

Today_Today_
Автор

thanks harry bhai for teaching java🤝...
import java.util.Scanner;

public class Exercise1 {
public static void main(String[] args) {
of student");
Scanner S = new Scanner(System.in);
System.out.println("Enter the number of first subject");
float MA = S.nextFloat();
System.out.println("Enter the number of second subject");
float PHY = S.nextFloat();
System.out.println("Enter the number of third subject");
float CH= S.nextFloat();
System.out.println("Enter the number of fourth subject");
float ENG = S.nextFloat();
System.out.println("Enter the number of fifth subject");
float COM = S.nextFloat();
float totalpercentage = MA/5+PHY/5+CH/5+ENG/5+COM/5;
System.out.println("Total precentage is: ");

}
}

anchitkaushal.
Автор

Brother the course is amazing! Thanks a lot for the course. You are putting a lot of efforts in this Java course, I am Thankful to you for all your efforts. You are the best teacher ever. I can't express that how much thankful I am .
My answer for the problem is:

public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner aj = new Scanner(System.in);
float total = 500;
System.out.println("Enter English Marks");
float sub1 = aj.nextFloat();
System.out.println("Enter SocialScience Marks");
float sub2 = aj.nextFloat();
System.out.println("Enter Computer Marks");
float sub3 = aj.nextFloat();
System.out.println("Enter Science Marks");
float sub4 = aj.nextFloat();
System.out.println("Enter Hindi Marks");
float sub5 = aj.nextFloat();
float sum = sub1+sub2+sub3+sub4+sub5;
System.out.print("The total marks are: ");
System.out.println(sum);
float Percentage = (sum/total)*100;
System.out.print("The percentage is: ");

}

}

*Thanks a lot*

disha
Автор

Dear harry bhai
I am a student.Your coding cocepts clear my all doubts.I have done the exersise.Please check and reply to me.
I made this of 400 marks.

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
System.out.println("Taking out percentage");
Scanner sc = new Scanner(System.in);
System.out.println("Enter first subject marks");
int marks = sc.nextInt();
float pct = marks*100/400;
System.out.println(pct);

Thank you for the very good course to help us learn java.

lizabhadana
Автор

//write a program that calculates the percentage of a student's marks
// in 5 subjects
import java.util.Scanner;
public class Cbse {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int math, phy, chem, bio, eng;
System.out.println("Enter math marks");
math = sc.nextInt();
System.out.println("Enter physics marks");
phy = sc.nextInt();
System.out.println("Enter chemistry marks");
chem = sc.nextInt();
System.out.println("Enter biology marks");
bio = sc.nextInt();
System.out.println("Enter english marks");
eng = sc.nextInt();

double total = math+phy+chem+bio+eng;
double p = total/500;
double percentage = p*100;

System.out.println("Marks in math = "+math);
System.out.println("Marks in physics = "+phy);
System.out.println("Marks in chemistry = "+chem);
System.out.println("Marks in biology = "+bio);
System.out.println("Marks in english = "+eng);

System.out.println("Your percentage is "+percentage+"%");
}
}

Syed_Miraz_Ali
visit shbcf.ru