[ create a new paste ] login | about

Link: http://codepad.org/6zBQXQIT    [ raw code | output | fork ]

PHP, pasted on May 7:
1
2
3
4
5
6
7
8
9
10
11
<?php
    // Dummy answers
    $ans1 = 3;
    $ans2 = 2;
    $ans3 = 7;

    $result = $ans1 == 3;
    $result += $ans2 == 2;
    $result += $ans3 == 1;
    
    echo "You got $result/3 questions right";


Output:
1
You got 2/3 questions right


Create a new paste based on this one


Comments: