fork download
  1. #include <stdio.h>
  2. int main ()
  3. {
  4. int a, b, c;
  5. a = 1 ;
  6. b = 1 ;
  7. c = a * b;
  8. printf("Integers (a,b) and product (c) are : %d,%d,%d \n", a,b,c);
  9.  
  10. while (b < 3){
  11. b = b + 1 ;
  12. c = a * b ;
  13. printf("Integers (a,b) and product (c) are : %d,%d,%d \n", a,b,c);
  14. }
  15.  
  16. if (b == 3){
  17. a = 2 ;
  18. b = 1 ;
  19. c = a * b ;
  20. printf("Integers (a,b) and product (c) are : %d,%d,%d \n", a,b,c);
  21. }
  22.  
  23. while (b < 3){
  24. b = b + 1 ;
  25. c = a * b ;
  26. printf("Integers (a,b) and product (c) are : %d,%d,%d \n", a,b,c);
  27. }
  28.  
  29. if (b == 3){
  30. a = 3 ;
  31. b = 0 ;
  32. c = a * b ;
  33. }
  34.  
  35. while (b < 3){
  36. b = b + 1 ;
  37. c = a * b ;
  38. printf("Integers (a,b) and product (c) are : %d,%d,%d \n", a,b,c);
  39. }
  40.  
  41. return 0;
  42. }
  43.  
Success #stdin #stdout 0s 4564KB
stdin
Standard input is empty
stdout
Integers (a,b) and product (c) are : 1,1,1 
Integers (a,b) and product (c) are : 1,2,2 
Integers (a,b) and product (c) are : 1,3,3 
Integers (a,b) and product (c) are : 2,1,2 
Integers (a,b) and product (c) are : 2,2,4 
Integers (a,b) and product (c) are : 2,3,6 
Integers (a,b) and product (c) are : 3,1,3 
Integers (a,b) and product (c) are : 3,2,6 
Integers (a,b) and product (c) are : 3,3,9