Go Program to find Sum of Odd Numbers

Golang Program to Find Sum of Odd Numbers 4

This Go program to find the Sum of Odd Numbers from 1 to n uses the for loop to iterate between 1 and n. Inside the loop, if statement filters the odd numbers and adds total to odd total. package main import “fmt” func main() { var oddnum, Oddtotal int fmt.Print(“Enter the Number to find … Read more