Skip to content

Justbtech

  • GIS
  • CTPM
  • Machine Learning
  • Privacy Policy

goto statement

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

  • Flood Mapping with Random Forest: Sentinel-1 & Sentinel-2 in Google Earth Engine (Kerala Floods 2018 Case Study)
  • C Programming & Data Structures: Complete Syllabus Index
  • Recursive Functions in C: Factorial and Fibonacci, Revisited with Recursion Trees
  • Functions in C for Unit III: User-Defined Functions, Inter-Function Communication, Storage Classes, and Scope Rules
  • Sorting in C: Bubble Sort, Selection Sort, and Insertion Sort

Recent Comments

No comments to show.

Archives

  • October 2026
  • 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