title: How to get changed value from one loop to another
body: <p>I want to get the changed value of a from loop 1 to loop 2. For c programming (i am not printing whole programme)
  Edit:
  i think i should have write it more clearly so let me give a example let a = 500 and attack be 200 when loop 1 is executed for first time a becomes 300 now i want this value of a =300 to go into loop 2 but in output value 500 is going in for loop 2</p>
  
  <pre><code>    for (a= 500; a&gt;= 0;) // loop 1
              {
                  a= a- attack;
  
                  printf("Health remaining(Trainer 2) %10d\n", a);
                  break;
              }
  
              for (a; a&gt;= 0;) // loop 2
              {
                  printf("Trainer 2 :Enter 1 to commence attack\n");
                  scanf("%d", &amp;b);
  </code></pre>