Pages

Thursday, March 27, 2025

// simple "apna college" example to learn difference between do while and while loop

 #include <iostream>

using namespace std; // simple "apna college" example to learn difference between do while and while loop
int main(){
    int val = 1;
   
    do{
        cout << "apna college ";

    } while(val > 5);

    while(val > 5){
        cout << "apna college";
    }
    return 0;

}

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...