Simple OOP practice or home work (for 41 section 4 only )

Question

Write a program that shows your name as output and can show largest number among given 3 int number.

in progress 1
Ask me anything 3 years 29 Answers 702 views 4

Answers ( 29 )

  1. Name-Arman Hossain
    Id-156
    Intake-41

    #include <iostream>
    using namespace std;
    #define MAX_LENGTH 100

    int main()
    {
    char name[MAX_LENGTH]={0};

    cout<<“Enter name of the person: “;
    cin.getline(name,MAX_LENGTH);

    cout<<“Name: “<<name<<endl;
    int n1, n2, n3;
    cout << “Enter three numbers: “;
    cin >> n1 >> n2 >> n3;
    if(n1 >= n2 && n1 >= n3)
    {
    cout << “Largest number: ” << n1;
    }
    if(n2 >= n1 && n2 >= n3)
    {
    cout << “Largest number: ” << n2;
    }
    if(n3 >= n1 && n3 >= n2) {
    cout << “Largest number: ” << n3;
    }
    return 0;
    }

  2. Name:  Tamanna Tasnim

    ID:     18192103142

    Intake:   41

    Section:  04

     

    #include <iostream>
    using namespace std;
    int main()

    {
    int num1, num2, num3;

    cout << “Enter three numbers: “;

    {
    cin >> num1 >> num2 >> num3;

    if(n1 >= n2 && n1 >= n3)
    {
    cout << “Largest number: ” << num1;
    }
    if(num2 >= num1 && num2 >= num3)
    {
    cout << “Largest number: ” << num2;
    }
    if(num3 >= num1 && num3 >= num2)
    {
    cout << “Largest number: ” << num3;
    }
    }
    return 0;
    }

  3. Name:Md. Emon Ali

    Intake :41

    sec:4

     

    #include<iostream>
    using namespace std;
    int main()
    {
    int a,b,c;
    cout <<“Hi !,I Am Emon”<<endl;

    cout<<“nEnter three numbers n”<<endl;

    cin>>a>>b>>c;

    if(a>b && a>c)
    cout<<“nLargest number is “<<a;
    if(b>a && b>c)
    cout<<“nLargest number is “<<b;
    if(c>a && c>b)
    cout<<“nLargest number is “<<c;

    return 0;

    }

  4. Name- MD Ashraful Hossain
    ID-18192103137
    Intake -41
    Section-4

    #include <iostream>
    using namespace std;
    #define MAX_LENGTH 100

    int main()
    {
    char name[MAX_LENGTH]={0};

     cout<<“Enter name of the person: “;
    cin.getline(name,MAX_LENGTH);


    cout<<“Name: “<<name<<endl;
    int n1, n2, n3;
    cout << “Enter three numbers: “;
    cin >> n1 >> n2 >> n3;
    if(n1 >= n2 && n1 >= n3)
    {
    cout << “Largest number: ” << n1;
    }
    if(n2 >= n1 && n2 >= n3)
    {
    cout << “Largest number: ” << n2;
    }
    if(n3 >= n1 && n3 >= n2) {
    cout << “Largest number: ” << n3;
    }
    return 0;
    }


  5. Name : Sanjara
    ID:18192103166

    #include<iostream>
    using namespace std;
    int main()
    {
    int n1,n2,n3;
    cout<<“Sanjara”<<endl;
    cout<<“Enter three numbers “;
    cin>>n1>>n2>>n3;
    if(n1>n2 && n1>n3)
    cout<<” Largest : “<<n1;
    if(n2>n1 && n2>n3)
    cout<<” Largest : “<<n2;
    if(n3>n1 && n3>n2)
    cout<<” Largest : “<<n3;
    return 0;
    }

  6. Sorry it a private answer.

  7. Sorry it a private answer.

  8. Name : Rumman
    ID : 18192103138

    #include<iostream>
    using namespace std;
    int main()
    {
    int n1,n2,n3;
    cout<<“Sanjara”<<endl;
    cout<<“Enter three numbers “;
    cin>>n1>>n2>>n3;
    if(n1>n2 && n1>n3)
    cout<<” Largest : “<<n1;
    if(n2>n1 && n2>n3)
    cout<<” Largest : “<<n2;
    if(n3>n1 && n3>n2)
    cout<<” Largest : “<<n3;
    return 0;
    }

  9. Name: Rakibul Hasan Shafin

    Intake: 41

    Section: 04

    ID: 18192103165

    #include <iostream>
    using namespace std;
    #define MAX_LENGTH 100

    int main()
    {
    char name[MAX_LENGTH]={0};

    cout<<“Enter name of the person: “;
    cin.getline(name,MAX_LENGTH);

    cout<<“Name: “<<name<<endl;
    int n1, n2, n3;
    cout << “Enter three numbers: “;
    cin >> n1 >> n2 >> n3;
    if(n1 >= n2 && n1 >= n3)
    {
    cout << “Largest number: ” << n1;
    }
    if(n2 >= n1 && n2 >= n3)
    {
    cout << “Largest number: ” << n2;
    }
    if(n3 >= n1 && n3 >= n2) {
    cout << “Largest number: ” << n3;
    }
    return 0;
    }

  10. Md.Muntasir Mamun

    Id:18192103179

    Intake:41

    Sec:4

    #include <iostream>

    using namespace std;

    #define MAX_LENGTH

    100

    int main()

    {

    char name[MAX_LENGTH]={0};

    cout<<“Enter name of the person: “;

    cin.getline(name,MAX_LENGTH);

    cout<<“Name: “<<name<<endl;

    int n1, n2, n3;

    cout << “Enter three numbers: “;

    cin >> n1 >> n2 >> n3;

    if(n1 >= n2 && n1 >= n3) { cout << “Largest number: ” << n1;

    }

    if(n2 >= n1 && n2 >= n3)

    {

    cout << “Largest number: ” << n2;

    }

    if(n3 >= n1 && n3 >= n2)

    {

    cout << “Largest number: ” << n3;

    }

    return 0;

    }

  11. Name : Arup Raton Chowdhury

    ID :18192103155

    #include <iostream>
    using namespace std;
    int main()
    {
    int n1, n2, n3;

    cout<< “Arup Chowdhury nn “;
    cout << “Enter three numbers: “;
    cin >> n1 >> n2 >> n3;

    if((n1 >= n2) && (n1 >= n3))
    cout << “Largest number: ” << n1;

    else if ((n2 >= n1) && (n2 >= n3))
    cout << “Largest number: ” << n2;

    else
    cout << “Largest number: ” << n3;

    return 0;
    }

  12. Name :Meftahul Jannat
    ID : 18192103149

    #include<iostream>
    using namespace std;
    int main()
    {
    int n1,n2,n3;
    cout<<“Ulfat”<<endl;
    cout<<“Enter three numbers “;
    cin>>n1>>n2>>n3;
    if(n1>n2 && n1>n3)
    cout<<” Largest : “<<n1;
    if(n2>n1 && n2>n3)
    cout<<” Largest : “<<n2;
    if(n3>n1 && n3>n2)
    cout<<” Largest : “<<n3;
    return 0;
    }

  13. Sorry it a private answer.

  14. Name : Md Masudul Islam Asif

    ID No : 18192103147

    Intake : 41

    section : 4

     

    #include<iostream>
    using namespace std;
    int main()
    {
    int a,b,c;
    cout <<“Hi !,I Am Emon”<<endl;

    cout<<“nEnter three numbers n”<<endl;

    cin>>a>>b>>c;

    if(a>b && a>c)
    cout<<“nLargest number is “<<a;
    if(b>a && b>c)
    cout<<“nLargest number is “<<b;
    if(c>a && c>b)
    cout<<“nLargest number is “<<c;

    return 0;

    }

  15. Name:Shamima Akter Shimu Id:18192103144

    #include <iostream>
    using namespace std;
    #define MAX_LENGTH 100

    int main()
    {
    char name[MAX_LENGTH]={0};

    cout<<“Enter name of the person: “;
    cin.getline(name,MAX_LENGTH);

    cout<<“Name: “<<name<<endl;
    int n1, n2, n3;
    cout << “Enter three numbers: “;
    cin >> n1 >> n2 >> n3;
    if(n1 >= n2 && n1 >= n3)
    {
    cout << “Largest number: ” << n1;
    }
    if(n2 >= n1 && n2 >= n3)
    {
    cout << “Largest number: ” << n2;
    }
    if(n3 >= n1 && n3 >= n2) {
    cout << “Largest number: ” << n3;
    }
    return 0;
    }

  16.  

    Name: Tabassum Mehrin Prova

    ID:177

    sec:4

    #include<iostream>
    using namespace std;
    int main()
    {
    int a,b,c;
    cout <<“Hi !,I Am Prova”<<endl;

    cout<<“nEnter three numbers n”<<endl;

    cin>>a>>b>>c;

    if(a>b && a>c)
    cout<<“nLargest number is “<<a;
    if(b>a && b>c)
    cout<<“nLargest number is “<<b;
    if(c>a && c>b)
    cout<<“nLargest number is “<<c;

    return 0;

    }

  17.  

     

    Name:Sabila Rahman

    Id:136

    #include <iostream>
    using namespace std;
    #define MAX_LENGTH 100

    int main()
    {
    char name[MAX_LENGTH]={0};

    cout<<“Enter name of the person: “;
    cin.getline(name,MAX_LENGTH);

    cout<<“Name: “<<name<<endl;
    int n1, n2, n3;
    cout << “Enter three numbers: “;
    cin >> n1 >> n2 >> n3;
    if(n1 >= n2 && n1 >= n3)
    {
    cout << “Largest number: ” << n1;
    }
    if(n2 >= n1 && n2 >= n3)
    {
    cout << “Largest number: ” << n2;
    }
    if(n3 >= n1 && n3 >= n2) {
    cout << “Largest number: ” << n3;
    }
    return 0;
    }

  18. Name: Bushrat Jahan

    ID: 18192103160

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    int a,b,c;
    cout<<“ENTER YOUR NUMBER: “;
    cin>>a>>b>>c;
    if(a>b&&a>c)  cout<<“BIG NUMBER IS “<<a<<endl;
    else if(b>a&&b>c)  cout<<“BIG NUMBER IS “<<b<<endl;
    else cout<<“BIG NUMBER IS “<<c<<endl;
    return 0;
    }

  19. Name: Moinul islam

    ID: 18192103180

    #include<iostream>
    using namespace std;
    int main()
    {
    int a,b,c;
    cout <<“moinul”<<endl;
    cout<<“nEnter three numbers “<<endl;

    cin>>a>>b>>c;

    if(a>b && a>c)
    cout<<“Largest number is “<<a;
    if(b>a && b>c)
    cout<<“Largest number is “<<b;
    if(c>a && c>b)
    cout<<“Largest number is “<<c;

    return 0;

    }

  20. #Mosraful Habib

    ID: 18192103172

    #include<iostream>
    using namespace std;
    int main()
    {
    int a,b,c;
    cout<<“Enter three numbers “<<endl;

    cin>>a>>b>>c;

    if(a>b && a>c)
    cout<<“Largest number is “<<a;
    if(b>a && b>c)
    cout<<“Largest number is “<<b;
    if(c>a && c>b)
    cout<<“Largest number is “<<c;

    return 0;

    }

  21. D.K.Shah Alam
    ID:18192103176

    #include
    using namespace std;
    int main()
    {
    float a, b, c;
    cout<<"Shah Alam"<<endl;
    cout << "Enter three numbers: "<> a >> b >> c;
    if((a >= b) && (a >= c))
    cout << "Largest number is: " << a <= a) && (b >= c))
    cout << "Largest number is: " << b <<endl;
    else
    cout << "Largest number is: " << c<<endl;

    return 0;
    }

  22. Name: Hasebul Hassan Siam

    Intake: 41

    Section: 04

    ID: 18192103162

    #include
    using namespace std;
    #define MAX_LENGTH 100

    int main()
    {
    char name[MAX_LENGTH]={0};

    cout<<“Enter name of the person: “;
    cin.getline(name,MAX_LENGTH);

    cout<<“Name: “<<name<<endl;
    int n1, n2, n3;
    cout <> n1 >> n2 >> n3;
    if(n1 >= n2 && n1 >= n3)
    {
    cout << “Largest number: ” <= n1 && n2 >= n3)
    {
    cout << “Largest number: ” <= n1 && n3 >= n2) {
    cout << “Largest number: ” << n3;
    }
    return 0;
    }

  23. Name: Rois Uddin Khan EMON
    Intake: 41
    Sec: 4
    ID: 18192103153

    #include
    #include
    using namespace std;

    int main(){
    int num1, num2, num3;
    cout<<"My name is Emon"<<endl;
    cout<>num1>>num2>>num3;
    if(num1>=num2 && num1>=num3){
    cout<<"Largest Number: "<=num1 && num2>=num3){
    cout<<"Largest Number: "<=num1 && num3>=num2){
    cout<<"Largest Number: "<<num3;
    }

    return 0;
    }

  24. Name:MD Tayeb
    Intake :41
    sec:4
    ID: 18192103153

    #include
    using namespace std;
    int main()
    {
    int a,b,c;
    cout <<“Hi !,I Am Emon”<<endl;

    cout<<“nEnter three numbers n”<>a>>b>>c;

    if(a>b && a>c)
    cout<<“nLargest number is “<a && b>c)
    cout<<“nLargest number is “<a && c>b)
    cout<<“nLargest number is “<<c;

    return 0;

    }

  25. Name:MD Tayeb
    Intake :41
    sec:4
    ID: 18192103164

    #include
    using namespace std;
    int main()
    {
    int a,b,c;
    cout <<“Hi !,I Am Emon”<<endl;

    cout<<“nEnter three numbers n”a>>b>>c;

    if(a>b && a>c)
    cout<<“nLargest number is “c)
    cout<<“nLargest number is “
    b)
    cout<<“nLargest number is “<<c;

    return 0;

    }

  26. Name:MD Tayeb
    Intake :41
    sec:4
    ID: 18192103164

    #include
    using namespace std;
    int main()
    {
    int a,b,c;
    cout <<“Hi I Am Tayeb”<<endl;

    cout<>b>>c;

    if(a>b && a>c)
    cout<<“nLargest number is “c)
    cout<<“nLargest number is “b)
    cout<<“nLargest number is “<<c;

    return 0;

    }

  27. #include
    using namespace std;
    #define MAX_LENGTH 100

    int main()
    {
    char name[MAX_LENGTH]={0};

    cout<<“Enter name of the person: “;
    cin.getline(name,MAX_LENGTH);

    cout<<“Name: “<<name<<endl;
    int n1, n2, n3;
    cout <> n1 >> n2 >> n3;
    if(n1 >= n2 && n1 >= n3)
    {
    cout << “Largest number: ” <= n1 && n2 >= n3)
    {
    cout << “Largest number: ” <= n1 && n3 >= n2) {
    cout << “Largest number: ” << n3;
    }
    return 0;
    }

  28. shaminur rahman
    id:158
    #include
    using namespace std;
    int main()
    {
    int a,b,c;
    cout <<“Hi !,I Am Emon”<<endl;

    cout<<“nEnter three numbers n”<>a>>b>>c;

    if(a>b && a>c)
    cout<<“nLargest number is “<a && b>c)
    cout<<“nLargest number is “<a && c>b)
    cout<<“nLargest number is “<<c;

    return 0;

    }

Leave an answer