Thread
:
[SOLVED] C program i need to print 1 to 100 without using loop(ex:while do while,
View Single Post
#
3
(
permalink
)
06-10-2007, 04:50 PM
AboniL
Posts: n/a
you can use go to statement for this, and ternary operator instead of if condition.
void main()
{
int i;
i=1;
loop:
printf("%d", i)
(i<100)? i++: return 0;
go to loop;
}
__________________
AboniL