Pages

Monday, March 31, 2025

Multiplication in Functions in C++

 #include <iostream>

using namespace std;


int prod(int a, int b) {
    return a * b;
}
int main(){
     cout << prod(10, 20) << endl;

    return 0;
}


Output-
200

No comments:

Post a Comment

3917. Count Indices With Opposite Parity (Brute Force) O(n2) + Optimized Solution O(n) + tips LEETCODE WEEKLY 500

  class Solution {     public int [] countOppositeParity ( int [] nums ) {          // approach 1 - checks every pair         int n = n...