// #include // using namespace std; // int main(){ // /*int name = 1; // cout<<"hello this is my first program \n";*/ // int a = 6; // cout<<"a is : "< // using namespace std; // int books_in_the_bag_is = 900; // int main() // { // int books_in_the_bag_is = 500; // cout<<"this is a built in data type program"; // int a = 500; // char b = 'c'; // float c= 7346.3534; // double e= 8257365872635.287239562758; // bool f= true; // cout< // using namespace std; // int main(){ // int num1, num2; // cout<<"enter a number"; // cin>>num1; // cout<<"enter a second number"; // cin>>num2; // cout<<"the sum is \n"< // using namespace std; // int main() // { // int a = 6, b = 4; // // Binary AND operator // cout << "a & b is " << (a & b) << endl; // // Binary OR operator // cout << "a | b is " << (a | b) << endl; // // Binary XOR operator // cout << "a ^ b is " << (a ^ b) << endl; // // Left Shift operator // cout << "a<<1 is " << (a << 1) << endl; // // Right Shift operator // cout << "a>>1 is " << (a >> 1) << endl; // // One’s Complement operator // cout << "~(a) is " << ~(a) << endl; // return 0; // } // #include // using namespace std; // int main(){ // int a=8, b=4; // cout<<"a+b is "<b is "<<(a!=b)< // using namespace std; // int main(){ // cout<<"this is my first program in c++"; // int a=5, b=6; // cout<<"this is a logical operator"<b)))<b)||(a>=b))<=b)))<b))<,<=,>=,==,!=,"<<(ab)<<(a<=b)<<(a>=b)<<(a==b)<<(!(a==b))< // using namespace std; // int c=45; // int main(){ // int a,b,c; // cout<<"input the value of a"<>a; // cout<<"input the value of b"<>b; // c = a + b; // cout<<"the addition of a and b is : "<<::c/*this is use for function outside var*/< // using namespace std; // int c = 420; //this is a global variable // int main(){ // int a,b,c; // cout<<"enter the value of a"<>a; // cout<<"enter the value of b"<>b; //we can not write endl in cin because it cannot make sense // c = a+b; // cout<<"the sum is : "< // using namespace std; // int main(){ // char a = ("aditya porwal"); // char b = ("ashutosh porwal"); // char & c = b; // cout<<"the c is :"< // using namespace std; // int x=10; // int main(){ // int x =30; // cout<<"the value of x is: "<<::x< // using namespace std; // int main() // { // int x = 10; // // ref is a reference to x. // int& ref = x; // // Value of x is now changed to 20 // ref = 20; // cout << "x = " << x << '\n'; // // Value of x is now changed to 30 // x = 30; // cout << "ref = " << ref << '\n'; // return 0; // } // #include // using namespace std; // int main() // { // int x = 50; // int y = 100; // int & a = y; // int & z = x; // cout<<"the value of a = "< // #include // using namespace std; // int main(){ // int a = 3, b = 78, c = 1233; // cout<<"a is :"< // using namespace std; // int main(){ // int age; // cout<<"tell me your age : "<>age; // if(age<18){ // cout<<"you are a kid you cannot come to the party"< // using namespace std; // int main(){ // int age; // cout<<"tell me your age : "<>age; // switch(age) // { // case 18: // cout<<"you are 18"< // using namespace std; // main(){ // string signal; // cout<<"enter the signal: red/orange/green : "<>signal; // if(signal=="red") // { // cout<<"stop don't go "< // using namespace std; // main(){ // string weather; // cout<<"enter the weather of your city"<>weather; // if(weather=="rain"){ // cout<<"you go outside with your umbrella"< // using namespace std; // int main(){ // int amount,tax; // cout<<"enter the ammount"<>amount; // if(amount<=400000){ // cout<<"not tax"<=8000000 || amount<=17000000){ // cout<<"tax is 10%"<=11000000 || amount<=17000000) // { // cout<<"tax is 15%"< // using namespace std; // int main(){ // int age; // cout<<"enter your age: "<>age; // if(age>=18) // { // if(age>=18 && age<=59) // { // cout<<"you are eligible to work."< // using namespace std; // int main(){ // int num1, num2; // char operation; // cout<<"enter your first number : "<>num1; // cout<<"enter second number : "<>num2; // cout<<"enter operation your perform : "<>operation; // switch(operation){ // case '+': // cout<<"addition is : "< // using namespace std; // int main(){ // int num; // cout<<"give number between 1 to 7"<>num; // switch(num){ // case 1: // cout<<"monday"< // using namespace std; // main(){ // char grade; // cout<<"enter your grade"<>grade; // switch(grade){ // case 'a': // cout<<"excellent"< // using namespace std; // int main(){ // int num1,num2,result,operation; // cout<<"enter a number of operation 1:addition\n 2:substraction\n 3:multiplication\n 4:division\n 5:exit"<>operation; // cout<<"enter the first number: "<>num1; // cout<<"enter the second number: "<>num2; // switch(operation){ // case 1: // result = num1+num2; // cout<<"the addition is: "< // #include // using namespace std; // main(){ // string answer; // int score=0; // cout<<"what is the capital of japan"<>answer; // if(answer == "a") // { // cout<<"your answer is correct"<>answer; // if(answer == "b") // { // cout<<"your answer is correct"<>answer; // if(answer == "c") // { // cout<<"your answer is correct"<=4) // { // cout<<"excellent"; // } // else if(score<=3) // { // cout<<"your are the average student"< // using namespace std; // int main(){ // int a,b,addition,substraction,multiplication,division; // cout<<"enter the first number"<>a; // cout<<"enter the second number"<>b; // addition = a+b; // substraction = a-b; // multiplication = a*b; // division = a/b; // cout<<"the addition is: "< // using namespace std; // int main(){ // float celsius,fehrenheit; // cout<<"enter the value of celsius"<>celsius; // fehrenheit = celsius*9/5+32; // cout<<"the temprature is : "< // using namespace std; // int main(){ // float radius,result; // const double pi = 3.14159; // cout<<"enter the value of radius"<>radius; // result = pi*radius*radius; // cout<<"the area of radius of circle is : "< // using namespace std; // int main(){ // int SI,p,r,t; // cout<<"enter principle :"<>p; // cout<<"enter rate : "<>r; // cout<<"enter time : "<>t; // SI = p*r*t/100; // cout<<"the simple intrest is : "< // using namespace std; // int main(){ // int a,b; // cout<<"enter the value of a : "<>a; // cout<<"enter the value of b : "<>b; // int& ref1 = b; // int& ref2 = a; // cout<<"the value of a is : " < // #include // using namespace std; // int main() { // int intValue; // float floatValue; // string strValue; // cout << "Enter an integer: "; // cin >> intValue; // cout << "Enter a floating-point number: "; // cin >> floatValue; // cout << "Enter a string: "; // cin >> strValue; // cout << "\nFormatted Output:" << endl; // cout << setw(10) << "Integer" << setw(15) << "Float" << setw(20) << "String" << endl; // cout << setw(10) << intValue << setw(15) << fixed << setprecision(2) << floatValue << setw(20) << strValue << endl; // return 0; // } // #include // using namespace std; // int main(){ // char ch; // cout << "enter a char value : \n"; // cin>>ch; // if(ch>='a' && ch<='z'){ // cout << "Lowecase" << endl; // }else{ // cout << "Uppercase" < // using namespace std; // int main(){ // char ch; // cout << "enter a char value : \n"; // cin>>ch; // if(ch>=65 && ch<90){ // cout << "Uppercase"; // }else{ // cout << "Lowercase"; // } // } //cheak number positive or negetive // #include // using namespace std; // int main(){ // int num; // cout << "enter a number: \n"; // cin >>num; // cout << (num>=0 ? "Positive" : "Negetive") << endl; // return 0; // } //print number 1 to 5 // #include // using namespace std; // int main(){ // int count = 1; // while(count<=10){ // cout << count << '\n'; // count++; // } // } //print 1 to 10 number // #include // using namespace std; // int main(){ // int n = 10; // for(int i=1; i<=n; i = i+2){ // cout << i << endl; // } // } //print 1 to n number of sum // #include // using namespace std; // int main(){ // int n,sum=0; // i do mistake here pls define sum when you add numbers // cout << "Enter a Number : \n"; // cin >> n; // for(int i=1; i<=n; i++){ // sum+=i; // } // cout << "the sum is :\n" << sum << endl; // } //odd number sum // #include // using namespace std; // int main(){ // int n = 7, oddsum=0; // for(int i=1; i<=n; i++){ // if(i%2!=0){ // oddsum+=i; // } // } // cout << oddsum; // } //while oddsum print // #include // using namespace std; // int main(){ // int n, oddsum=0; // cout << "enter the number :\n"; // cin >> n; // int i=1; // while(i<=n){ // if(i%2!=0){ // oddsum+=i; // } // i++; // } // cout << oddsum; // } //do while 1 to 10 print // #include // using namespace std; // int main(){ // int n = 10; // int i = 1; // do { // cout << i << "\n"; // i++; // }while(i <= n); // } //cheak number is prime or not by for loop // #include // using namespace std; // int main(){ // bool isprime = true; // int n; // cout << "Enter The Number : \n"; // cin >> n; // for(int i=2; i*i <= n; i++){ // if(n%i==0){ // isprime = false; // break; // } // } // if(isprime == true){ // cout << "number is prime"; // }else{ // cout << "number is non prime"; // } // } // #include // using namespace std; // int main(){ // //column // int x = 10; // for(int i=1;i<=x;i++){ // //rows // int m = 5; // for(int j =1; j<=m; j++){ // cout << "*"; // } // cout << endl; // } // } //easy for loop star // #include // using namespace std; // int main(){ // int n=5; // for(int i=0;i // using namespace std; // int main(){ // int n=4; // for(int i=0;i // using namespace std; // int main(){ // int n=3; // int num=1; // for(int i=1;i<=n;i++){ // for(int j=1;j<=n;j++){ // cout << num; // num++; // } // cout << endl; // } // cout << "after pattern value: " << num << endl; // } //pattern question solved by me // #include // using namespace std; // int main(){ // int n=3; // char ch='A'; // for(int i=0;i // using namespace std; // int main(){ // int n = 4; // for(int i=1;i<=n;i++){ // for(int j=1;j // using namespace std; // int main(){ // int n = 4; // for(int i=0;i // using namespace std; // int main(){ // char ch='A'; // int n = 9; // for(int i=0;i // using namespace std; // int main(){ // int n = 4; // for(int i=0;i // using namespace std; // int main(){ // int n = 4; // int num = 1; // for(int i=0;i0;j--){ // // cout << j; // cout << num << " "; // num++; // } // cout << endl; // } // return 0; // } //char pattern // #include // using namespace std; // int main(){ // int n = 4; // char ch='A'; // for(int i=0;i0;j--){ // cout << ch; // ch++; // } // cout << endl; // } // } //triangle patteran 1 21 321 4321 // #include // using namespace std; // int main(){ // int n = 4; // for(int i=0;i0;j--){ // cout << j; // } // cout << endl; // } // } // #include // using namespace std; // int main(){ // int n=4; // for(int i=0;i // using namespace std; // int main(){ // int n = 4; // for(int i=1;i<=n;i++){ // for(int j=0;j using namespace std; int main(){ int n = 5; for(int i=1; i<=n; i++){ int value = n; for(int k=1; k