Pages

Friday, March 21, 2025

inputs in C++? How does it work

 


#include<iostream>
#include<iomanip>
using namespace std;

int main() {
    int age; // garbage value
    cout<<"Enter your age: ";
    cin>>age;  // cin waits for a value to be entered

    cout<<"your age is "<<age<<endl;
    return 0;

}

No comments:

Post a Comment

Encode and Decode Strings - NeetCode.IO Solution by me + gemini pro 3.0 explained

  class Solution {         // encode: List of Strings -> String     public String encode ( List < String > strs) {         Stri...