Basic Syntax & First Code Build Here is the syntax list for beginners to know how to start coding. Header Files #include<bits/stdc++.h> Function Syntax cin>> cout<< endl Data Type int string char double float Structure #include<bits/stdc++.h> using namespace std ; int main () { //**ALL MAGIC HERE** --> Commented using '//' } The header file given above is usually enough for any code since it is a combined file of almost all C++ header files . The cin must have >> and cout must have << and all code usually ends with a " ; " int accepts integer numbers between -2,147,483,648 to 2,147,483,647 . string accepts inputs like agh3487bkk. You can guess and then check what the other data types do . With this knowledge, try and see if you can generate this output, if you just got started in C++, then see the code and get the idea and then try it on your own. #include<bits/stdc++.h> using namespace std ...
Comments
Post a Comment