[text] C

Viewer

  1. #include<stdlib.h>
  2. #include<stdio.h>
  3.  
  4. int main(int argc,char* argv[])
  5. {
  6.         int a=atoi(argv[1]);
  7.         int b =atoi(argv[2]);
  8.         int c=0;
  9.  
  10.          while(b>=a)
  11.         {
  12.                 b=b-a;
  13.                 c=c+1;
  14.         }
  15.        
  16.        printf("\nb = %d",b);
  17.        printf(" ");
  18.        printf("\nc = %d\n",c);
  19.        
  20. return 0;
  21. }
  22.  

Editor

You can edit this paste and save as new:


File Description
  • C
  • Paste Code
  • 25 Sep-2021
  • 283 Bytes
You can Share it: