Posts

revison

 #include <stdio.h> int main(int argc, char **argv) { /* SYNTAX OF ARRAYS array_name[index] {contents of the array}; * GOLBAL VARIABLES KO MAIN KE BAHAR USE KRTE H AUR VO GLOBALLY USE HO SKTA H  * VECTOR SYNTAX vector <int> vector_name (number_of_articles) {initialize them here } ya phir hum  Vector key element ko ye initilize them here me hi define kr sklte h taaki number of articles na krne pde  * .AT USE - iska use kisi specific element of vector ko nikalne ke liye krte h SYNTAX element_name.at(index) * TO ADD AN ELEMT TO THE VECTOR SYNTAX vector_name.pushback(element) * TO GET THE SIZE OF VECTOR - vector_name.size() * CONSTANT CAN'T BE CHANGED THEY ARE READ ONLY  * to increase by 1 ++ * to decrease by 1 -- * to change the typr of a number static_cast<double>(total) * to get true or false in statements cout<<boolalpha; * a += 1; is also equal to a = a + 1;     * JB NESTED IF STATEMENTS USE KRTE H TB ELSE IF KE END ME CUR...

sourcecode

 #include <iostream> #include <vector> #include <iomanip> #include <cmath> using namespace std; int main() { //    int favorite_number; //    cout<< "Enter your favourite number b/w 1 and 100:- "; // //    cin >> favorite_number; //    cout << "Nice thats my favorite number too! " << endl; //    cout << "No really "<< favorite_number<<" is my favorite number "<< endl; //    return 0; //      int room_width{0}; //      int room_length{0}; //      cin >> room_width; // //      cout << "Enter the width "; // //       //      cout << "Enter the length " ; //      cin >> room_length; //      cout << "The area of the room is " << room_length * room_width << endl; //      return 0...