Skip to content

Justbtech

  • GIS
  • CTPM
  • Machine Learning
  • Privacy Policy

loops

Print Natural Numbers from 1 to N Using goto Statement in C

September 23, 2026 by admin

This program prints all natural numbers from 1 to a number n entered by the user, using a goto statement to create a loop-like jump. C Program #include <stdio.h> int main() { int n, i = 1; printf(“Enter n: “); scanf(“%d”, &n); loop: if (i

Categories C Programming Tags C programming, goto statement, lab exam, loops Leave a comment

Recent Posts

  • Check Whether a Number Is a Palindrome Using a While Loop in C
  • Find Student Grade Using If-Else Ladder in C
  • Calculate Area and Circumference of a Circle in C
  • Check Whether a Matrix Is Symmetric in C
  • Find the Largest and Smallest Elements in a 1-D Array in C

Recent Comments

No comments to show.

Archives

  • September 2026
  • September 2025
  • October 2024
  • April 2023
  • January 2023

Categories

  • C Programming
  • CTPM
  • GIS
  • Machine Learning
  • Regression Model
  • Uncategorized
© 2026 Justbtech • Built with GeneratePress