Simple coding for calculating the grade in PHP

Asked By 30 points N/A Posted on -
qa-featured

I am fresh in PHP, I need a simple coding for calculating the grade in PHP. This is for me to understand the functions used.

SHARE
Answered By 5 points N/A #138396

Simple coding for calculating the grade in PHP

qa-featured

Hi Carr, as usual the concept behind every program is same. In different languages you just have to change the syntax. That's all. I recommend you to study programming language c for your basic concept. If your basic is clear then you can go a long way in programming. I have attached a file for your grade program which is a combination of HTML and PHP code. I hope that you know what HTML code is. Good luck.

Answered By 0 points N/A #198244

Simple coding for calculating the grade in PHP

qa-featured

Hi,

If you know language like C and others, just what logic you use in that languages same logic you have to use over here.

Just syntax is changed.

Follow this example.

<?php

$marks=1000;

$calculate = $marks;



if ($calculate < 800) {

    echo "C";

} else if ($calculate < 1200) {

    echo "B!";

} else if ($calculate == 1200) {

    echo "A";

}

?>

 

Related Questions