Go program to find Sum and Average of Natural Numbers

This Go program uses the for loop to iterate from 1 to n and finds the sum and average of natural numbers. Inside the for loop, we add each number to the total, and outside the loop, we calculated the average. package main import “fmt” func main() { var num, i int fmt.Print(“\nEnter the Maximum … Read more