Computer Science, asked by hardikaryan106, 21 days ago

Write a program in c++ to demonstrate use of overloading
1.Unary Operator Overloading
2.Binary Operator Overloading
3.Function Overloading.​

Attachments:

Answers

Answered by RajeshChaubeyKing
0

© program:

Scanner sc = new Scanner(System.in);

System.out.println(" enter a number ");

int n=sc.nextInt();

if(n==1)

System.out.println("January");

if(n==2)

System.out.println("Februry");

if(n==3)

System.out.println("March");

if(n==4)

System.out.println("April");

if(n==5)

System.out.println("May");

if(n==6)

System.out.println("june");

if(n==7)

System.out.println("July");

if(n==8)

System.out.println("August");

if(n==9)

System.out.println("September");

if(n==10)

System.out.println("October");

if(n==11)

System.out.println("November");

if(n==12)

System.out.println("December");

if(n==34)

System.out.println(" please enter correct choice ");

if(n==145)

System.out.println(" this is wrong choice ");

}

}

©key terms

Q(1).Unary Operator Overloading?

answer→import java.util.*;

Q(2)..Binary Operator Overloading?

answer→ import java.lang.*;

Q(3)...Function Overloading.

answer→import java.io.*;

hope it helps please mark me as brainliest

Similar questions