Ad
Code
Diff
  • int doubleValue(int x) { return x * 2; }
    
    • #include<iostream>
    • int doubleValue(int x) {
    • return x * 2;
    • }
    • int doubleValue(int x) { return x * 2; }
Code
Diff
  • bool isLeap(long n) {
      return !((n % 4) || (!(n % 100) && n % 400));
    }
    • bool isLeap(long n) {
    • if ((n % 4 == 0 && n % 100 != 0) || (n % 400 == 0))
    • return true;
    • return false;
    • return !((n % 4) || (!(n % 100) && n % 400));
    • }
Code
Diff
  • unsigned long long div2(unsigned long long a) {
      return a / 2;
    }
    • unsigned long long div2(unsigned long long a){
    • return (a / 2);
    • unsigned long long div2(unsigned long long a) {
    • return a / 2;
    • }