[ create a new paste ] login | about

Link: http://codepad.org/wwP1K08Q    [ raw code | output | fork ]

C, pasted on Jun 20:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* C code */
#include <stdio.h>
int main() {
int a=1; 
int b=10;
do{
b-=a;
a++;
}while(b--<0);

  printf("The current value of a,b is: %i %i \n", a,b);

  return 0;
}


Output:
1
The current value of a,b is: 2 8 


Create a new paste based on this one


Comments: