Read User Input: Python vs C++

preview_player
Показать описание
#Python #Cplusplus #Programming #Coding #Tech
Рекомендации по теме
Комментарии
Автор

in the top, you can write using namespace std; and not write std before cout cin every std

Tupoi_calculator
Автор

If u just use the var once, why don’t u just write it in the same line?

Chuen
Автор

It's already 2025, people are still taking examples from ultra old versions of C++ (maybe the same for python)

masterkondra
Автор

Why don't you use it using namespace std?

MOSINGUN
Автор

And what are you trying to prove with this?

kukukudoes
Автор

import std;

int main() {
std::string name;
std::print("Enter your name: ");
std::getline(std::cin, name);
std::print("Hello, {}!\n", name);
}

diegospeziari
Автор

name = "Rahul"
print(f"Hello {name}")
Output - Hello Rahul

uttambisht
Автор

where "using namespace std;"... it's much more convenient this way

Builderscriptsfe
Автор

Name = input("enter your name")
print(f"hello{name}")

فوتنایت
Автор

100% cpp
It’s readable, informative, you see what you have.
Without that fancy ABC stuff😂
Let’s compare with php

Levor
Автор

That is one piece of uglyist code in c++ i have ever seen so far
Why tf you used std:: for every single code blocks !?
There's no need for that in this example

nishantkr
Автор

Under the header, type using namespace std to avoid writing std

Im_not_better