Register Now

Login


Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login


Register Now

Welcome to Our Site. Please register to get amazing features .

Function Overloading(for intake 41 sec 4)

Write a program that can overload two functions (one function give output as float number and another fuction add 10 with given int variable). DFo not use class or object here.

About Ask me anything


Follow Me

Comments ( 23 )

  1. Name: Md. Emon Ali

    Id:154  In:41  sec:4

    #include<iostream>
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    }
    void display(int B)
    {
    cout<<“integer+10=”<<B+10<<endl;
    }
    int main()
    {
    int b;
    float a;
    cin>>b;
    cin>>a;
    display(a);
    display(b);
    return 0;
    }

  2. Name:Sanjara
    Id:18192103166

    #include<iostream>
    using namespace std;
    float num(float n);
    int num(int m);
    float num (float n)
    {
    cout<<“Float number”<<endl;
    cin>>n;
    return n;
    }
    int num (int m)
    {
    cout<<“Integer number”<<endl;
    cin>>m;
    return (m+10);
    }
    int main ()
    {
    float n=10.5;
    cout<<n<<endl;
    int m=20;
    cout <<m;
    return 0;
    }

  3. Name: Rakibul Hasan Shafin

    ID: 18192103165

    Intake: 41

    Section: 04

    #include<iostream>
    using namespace std;
    float num(float n);
    int num(int m);
    float num (float n)
    {
    cout<<“Float number”<<endl;
    cin>>n;
    return n;
    }
    int num (int m)
    {
    cout<<“Integer number”<<endl;
    cin>>m;
    return (m+10);
    }
    int main ()
    {
    float n=10.5;
    cout<<n<<endl;
    int m=20;
    cout <<m;
    return 0;
    }

  4. #include<iostream>
    using namespace std;

    float number(float n);
    int number(int p);

    float number(float n)
    {
    cout<<“float”<<endl;
    cin>>n;
    return n;
    }
    int number(int p)
    {
    cout<<“int”<<endl;
    cin>>p;
    return (p+20);

    }
    int main()
    {
    float n = 20.5
    cout<<n<<endl;
    int p = 20;
    p=p+20;
    cout<<p;
    return 0;

    }

  5. Name : Moinul islam

    id: 18192103180

    In-41 sec-4

     

    #include<iostream>
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    }
    void display(int B )
    {
    cout<<“integer+10=”<<B+10<<endl;
    }
    int main()
    {
    int b;
    float a;
    cin>>b;
    cin>>a;
    display(a);
    display(b);
    return 0;
    }

  6. #include<iostream>
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    }
    void display(int B )
    {
    cout<<“integer+10=”<<B+10<<endl;
    }
    int main()
    {
    int b;
    float a;
    cin>>b;
    cin>>a;
    display(a);
    display(b);
    return 0;
    }

  7. #include
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    }
    void display(int B )
    {
    cout<<“integer+10=”<<B+10<>b;
    cin>>a;
    display(a);
    display(b);
    return 0;
    }

  8. Name:Tabassum Mehrin Prova
    ID:18192103177
    #include
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    }
    void display(int B )
    {
    cout<<“integer+10=”<<B+10<>b;
    cin>>a;
    display(a);
    display(b);
    return 0;
    }

  9. Name:Tabassum Mehrin Prova

    ID:18192103177

    #include
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    }
    void display(int B )
    {
    cout<<“integer+10=”<<B+10<>b;
    cin>>a;
    display(a);
    display(b);
    return 0;
    }

  10. Name:Nigar Sultana Era

    Id: 18192103175

    #include<iostream>
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    }
    void display(int B )
    {
    cout<<“integer+10=”<<B+10<<endl;
    }
    int main()
    {
    int b;
    float a;
    cin>>b;
    cin>>a;
    display(a);
    display(b);
    return 0;
    }

  11. MD Ashraful Hossain

    ID-18192103137
    #include<iostream>
    using namespace std;
    float number(float n);
    int number(int a);

    int main()
    {
    float n = 20.5;
    cout<<n;
    int a = 20;
    a=a+20;
    cout<<a;
    return 0;
    }

    float number(float n)
    {
    cout<<“float”<<endl;
    cin>>n;
    return n;
    }

    int number(int a)
    {
    cout<<“int”<<endl;
    cin>>a;
    return (a+20);
    }

  12. Name: Arman Hossain

    Id: 18192103156

    Intake:41….Section:04

    #include<iostream>
    using namespace std;
    float num(float n);
    int num(int m);
    float num (float n)
    {
    cout<<“Float number”<<endl;
    cin>>n;
    return n;
    }
    int num (int m)
    {
    cout<<“Integer number”<<endl;
    cin>>m;
    return (m+50);
    }
    int main ()
    {
    float n=50.5;
    cout<<n<<endl;
    int m=30;
    cout <<m;
    return 0;
    }

  13. #include<iostream>
    using namespace std;
    float num(float a);
    int num(int n);
    float num (float a)
    {
    cout<<“float number”<<endl;
    cin>>a;
    return a;
    }
    int num (int n)
    {
    cout<<“Integer number”<<endl;
    cin>>n;
    return (n+10);
    }
    int main ()
    {
    float a=20.5;
    cout<<a<<endl;
    int n=50;
    cout <<n;
    return 0;
    }

  14. Arup Raton Chowdhury

    ID-18192103155
    #include<iostream>
    using namespace std;
    float number(float n);
    int number(int a);
    int main()
    {
    float n = 20.5;
    cout<<n;
    int a = 20;
    a=a+20;
    cout<<a;
    return 0;
    }
    float number(float n)
    {
    cout<<“float”<<endl;
    cin>>n;
    return n;
    }
    int number(int a)
    {
    cout<<“int”<<endl;
    cin>>a;
    return (a+20);
    }

  15. Name:Shamima Akter Shimu Id:18192103144

    #include<iostream>
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    1. }
      void display(int B )
      {
      cout<<“integer+10=”<<B+10<<endl;
      }
      int main()
      {
      int b;
      float a;
      cin>>b;
      cin>>a;
      display(a);
      display(b);
      return 0;
      }
  16. Name: Tamanna Tasnim
    ID: 142

    #include
    using namespace std;

    float number(float n);
    int number(int a);
    int main()
    {
    float n = 100.5;
    cout<< "n";
    int a = 100;
    a=a+100;
    cout<<a;
    return 0;
    }
    float number(float n)
    {
    cout<<“float”<>”n”;
    return n;
    }
    int number(int a)
    {
    cout<<“int”<>”a”;
    return (a+100);
    }

  17. ID:18192103149

    Intake:41; Section:4

    #include<iostream>
    using namespace std;
    void display(float A)
    {
    cout<<“Float number:”<<A<<endl;

    }
    void display(int B)
    {
    cout<<“integer+10=”<<B+10<<endl;
    }
    int main()
    {
    int b;
    float a;
    cin>>b;
    cin>>a;
    display(a);
    display(b);
    return 0;
    }

  18. Md.Muntasir Mamun

    Intake:41 Sec:4

    #include<iostream>
    using namespace std;
    float num(float n);
    int num(int m);
    float num (float n)
    {
    cout<<“Float number”<<endl;
    cin>>n;
    return n;
    }
    int num (int m)
    {
    cout<<“Integer number”<<endl;
    cin>>m;
    return (m+10);
    }
    int main ()
    {
    float n=10.5;
    cout<<n<<endl;
    int m=20;
    cout <<m;
    return 0;
    }

  19. // Name: Syeda Nafia Sultana
    //Intake: 37
    //ID: 17181103058//

    #include <iostream>
    using namespace std;
    void num (float a)
    {
    cout << “Float number: “<< a << endl;
    }
    void num(int b)
    {
    cout<<“Integer number:”<<b<<endl;
    cout <<“Integer+10= “<< b+10 << endl;
    }
    int main()
    {
    float a;
    cin>>a;
    int b;
    cin>>b;
    num(a); num(b);
    return 0;
    }

  20. Name : Rumman
    ID : 18192103138
    inatake 41

    #include<iostream>
    using namespace std;

    float number(float n);
    int number(int p);

    float number(float n)
    {
    cout<<“float”<<endl;
    cin>>n;
    return n;
    }
    int number(int p)
    {
    cout<<“int”<<endl;
    cin>>p;
    return (p+20);

    }
    int main()
    {
    float n = 20.5
    cout<<n<<endl;
    int p = 20;
    p=p+20;
    cout<<p;
    return 0;

    }

  21. Name.. Asfack uddin nabil

    Id.173

    #include<iostream>

    using namespace std;
    float num(float n);
    int num(int m);
    float num (float n)
    {
    cout<<“Float number”<<endl;
    cin>>n;
    return n;
    }
    int num (int m)
    {
    cout<<“Integer number”<<endl;
    cin>>m;
    return (m+10);
    }
    int main ()
    {
    float n=10.5;
    cout<<n<<endl;
    int m=20;
    cout <<m;
    return 0;
    }

  22. NAME: Bushrat Jahan

    ID: 18192103160

    SECTION: 04

    #include<bits/stdc++.h>
    using namespace std;
    void func(int m, int n)
    {
    cout<<“integer value is “<<m<<” and “<<n<<endl;
    }
    void func(long long m, long long n)
    {
    cout<<“long value is “<<m<<” and “<<n<<endl;
    }
    void func(double m, double n)
    {
    cout<<“double value is “<<m<<” and “<<n<<endl;
    }
    int main()
    {
    int a,b;
    long long x,y;
    double p,q;
    cin>>a>>b>>x>>y>>p>>q;
    func(a,b);
    func(x,y);
    func(p,q);
    return 0;
    }

  23. D.K.Shah Alam
    iD.18192103176

    #include
    using namespace std;

    numk(double x)
    {
    cout<<"Float number is="<<x<<endl;
    }

    numk(int c)
    {

    cout<<"Integer number is(with 10+)="<<c+10<<endl;
    }
    int main ()
    {
    numk(10.2);
    numk(10);
    return 0;}

Leave a reply

Captcha Click on image to update the captcha .