Grading tests!

Report a typo

Anny has just finished learning about the if and else statements. She wants to use them in her Go program that checks if a student passed a test with a minimum score of 71 points.

If the student has scored 71 points or more, the program should print "Passed!" and if the student has scored less than 71 points, it should print "Failed!". Can you help her write a program that can validate the score of the students?

Sample Input 1:

71

Sample Output 1:

Passed!
Write a program in Go
package main

import "fmt"

// nolint:gomnd // DO NOT delete this comment!
func main() {
var score int
fmt.Scanf("%d", &score)

// Write the code required to validate the student's score here.
}
___

Create a free account to access the full topic