Posts

CPP patern

  // A // B C // D E F // G H I J // K L M N O // P Q R S T U_________________________________________________________________________ // #include <iostream> // using namespace std; // int main() // { //     int num; //     cout << "Enter num :"; //     cin >> num; //     char ch = 'A'; //     for (int i = 0; i <= num; i++) //     { //         // ch = ch + i; //         for (int j = 1; j <= i; j++) //         { //             cout << ch << " "; //             ch += 1; //         } //         cout << endl; //     } // } // A B C D E // B C D E F // C D E F G // D E F G H // // E F G H I  _____________________________________________ // #include <iostream> // using namespace std; // int main() // { // ...

HERE IS ALL THE PYTHON CODE I CREATE

 [04-02-2025 18:03] Salim Shaikh: Result student__________________________________ [04-02-2025 18:03] Salim Shaikh: marks=input("enter marks:") if(marks>"95"):     print("A++") elif(marks>"80"):     print("B") elif(marks>"60"):     print("C") elif(marks>"40"):     print("D") else:     print("fail") [04-02-2025 18:26] Salim Shaikh: single line condition________________________ [04-02-2025 18:26] Salim Shaikh: food=input("food:") food="yes"if food=="cake" else "no" print(food) [04-02-2025 19:27] Salim Shaikh: clever if ternary operator ____________________ [04-02-2025 19:27] Salim Shaikh: age=int(input("enter yor age:"))  vote=("no","yes")[age>=18] print(vote) [06-02-2025 10:39] Salim Shaikh: Count thr occurrence substr__________________________________________________ [06-02-2025 10:39] Salim Shaikh: #cou...

HERE IS ALL THE C CODE I CREATED

 [04-03-2025 16:54] Salim Shaikh: #include<stdio.h> int main() {     int a,b;     printf("enter valuve of a:");     scanf("%d",&a);     printf("enter valuve of b:");     scanf("%d",&b);     printf("addition of both is:%d", a+b);     return 0;      } [05-03-2025 16:13] Salim Shaikh: #include<stdio.h> int main() {     int age;      printf("enter number:");      scanf("%d",&age);           if (age>18)     {         printf("you can give your vote\n");     }     else     {         printf("you can not give vote\n");      }      printf("thankyou");           return 0; } [05-03-2025 16:37] Salim Shaikh: #include<stdio.h> int main() {     int age;      p...