Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
Getting the percentage

I was given a problem,where I had to get the Semesteral Grade that is : 40% of Midterm + 60% of Final. Below is the code:

    double Sgrade =(Mgrade * .40) +(Fgrade * .60);

I'm want to know, if this is the right way of getting the percentage?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Please see comments for explanation. Also side note I have renamed your variables using camelCase

let mGrade = 50 //assumes this is already a percent, otherwise you will need to convert percentage = (grade/total)*100;
let fGrade = 50 // assumes this is already a percent,, otherwise you will need to convert percentage = (grade/total)*100;
let sGrade = (mGrade*40/100) + (fGrade*60/100)

//percentage = (grade/total)*100;
console.log(sGrade);

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!