Ad
Code
Diff
  • int squaring (int num)
    {
      int squared = 0;
      for (int i = 0; i < num; i++)
      {
        squared += num; 
      }
      return squared;
    }
    • int sqauring (int num)
    • int squaring (int num)
    • {
    • int times ;
    • times = num ;
    • int squared ;
    • squared = 0;
    • for (int i = 0 ; i <times ; i++ )
    • {
    • squared = squared + num ;
    • }
    • return squared ;
    • int squared = 0;
    • for (int i = 0; i < num; i++)
    • {
    • squared += num;
    • }
    • return squared;
    • }