logoISU  

CS256 - Principles of Structured Design

Fall 2021

Displaying ./code/cs256su21code/jun07/loop2.c

/*
	similar to loop .c , but we're counting down instead of up
	
*/
#include <stdio.h>

int main()
{

	int start;
	printf("Starting number: ");
	scanf("%d", &start);

	int i;
	for(i = start; i >= 0; i--){

		printf("%d\n", i);


	}
	//printf("You printed %d numbers.\n", i-1);

	return 0;
}