Posts

Learning c++

/*//Write a program to make a simple calculator. int num1,num2; cout<<"Enter the first operand : "; cin>>num1; cout<<"Enter the second operand : "; cin>>num2; char operator23; cout<<"Enter the operator (+,-,*,/) : "; cin>>operator23; int addition = num1+num2; int subtraction = num2-num1; int multiplication = num1*num2; int division = num2/num1; switch (operator23) { case '+' : cout<< "Sum is : "<<addition; break; case '-' : cout<< "Difference is : "<<subtraction; break; case '*' : cout<< "Product is : "<<multiplication; break; case '/' : cout<< "Quotient is : "<<division; break; default:cout<<"invalid operator !!"; break; } // Write a program to print the table of : n int n; cout<<"Enter the number to print the table of : "; cin>...

Hackerank if else problem with solution --23/7/2022

Task Given an integer,  , perform the following conditional actions: If   is odd, print  Weird If   is even and in the inclusive range of   to  , print  Not Weird If   is even and in the inclusive range of   to  , print  Weird If   is even and greater than  , print  Not Weird import   java . io .*; import   java . util . Scanner ; public   class   Solution   {      public   static   void   main ( String []   args )   {          Scanner   sc   =   new   Scanner ( System . in );           int   n   =   sc . nextInt ();           int   to_check   =   n % 2 ;           if ( to_check != 0 ){   ...

15/12/2021

 H ey welcome to another new blog and lets start our todays journey so as usual I woke up around 6:30am -fresh up-learning for one hour-after that I went to home for school and prepare myself for school then I left my house for school and one thing is happened with me that my friend already went for school and I had to go school alone, Somehow I reached to school and met my friends after school we came back together and also we had to tution but we didn't go but we will go tution from tomorrow after we came back to home then I read namaj e johar after  went to mustard mill for change mustard to oil and milk cake , it took too much time and also I had to wait for it and around 5:45 I came to home then I just rest it out for some time and after esha I came to madrasa to study and I just started to write this blog and after writing this blog I have to study math , c++, sst etc. Today I thought not to sleep at night means i will sleep but hardly 5 to 6 hours . So this is for today...

Something to tell

Date-13/12/021 Hello My name is Md. Minhaj Raza . I am 16 currently study in class 10th in Aditya Birala Public School that is in Rehla . I have many dreams in my life that i have to achieve in life, I Know to  make these dreams true i have to work hard i know in many things i will be fail and many will be that may not achieve but still InshaALLAH  I will try my level best and InshaALLAH I am confirm that i will achieve many things in my life but yah the condition is that i have to work hard anyhow .

questions in cpp of variables and data types

   /* //Write a program to take input from user and add and find product also    int num1,num2,sum,product;    cout<<"Enter the first operands : ";    cin>>num1;    cout<<"Enter the second operands : ";    cin>>num2;    sum = num1+num2;    product = num1*num2;    cout<<"The Sum of these numbers is : "<<sum<<endl;    cout<<"The Product of these numbers is : "<<product<<endl;    return  0;    // Write a cpp in the area of rectangle is calculated.    int length,breath,area;     cout<<"Enter the length of rectangle : ";    cin>>length;    cout<<"Enter the breath of rectangle : "; cin>>breath; area=2*(length+breath); cout<<"The area of given rectangle is : "<<area;   //Write a cpp program to find the ASCII value of given character...

//Write a program to find a frind's father's name by taking the name of your friends:

 /****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,  C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <iostream> using namespace std; int main() {         //Write a program to find a frind's father's name by taking the name of your friends:     string name;      cout<<"Enter your name :";      getline(cin,name);           if (name == "Minhaj"){          cout<<"You father's name is Aurangzeb Ansari";      } else if(name=="sajid"){          cout<<"You father's name is Tabarkh Uncle";      }e...

if else practice question for beginners with solution

  #include <iostream> using namespace std ; int main (){     //date-12/11/2021 /*int length, breadth; cout<<"Enter the length and breadth of the rectangle. :"; cin>>length; cin>>breadth; if(length==breadth){   cout<<"yes it is square" ; } else { cout<<"It is not Square"; } // Take three int input from user from user and print greatest among them . int num1,num2,num3; cout<<"Enter the first number :" <<endl; cin>>num1; cout<<"Enter the first number :"<<endl; cin>>num2; cout<<"Enter the first number :"<<endl; cin>>num3; if (num1>num2 && num3<num1){   cout<<"First number is greater : "<<num1;    }    else if (num2>num1 && num3<num2){    cout<<"Second number is greater : "<<num2; } else {    cout<<"Third number is greater : "<<num3; }  int bholu,...