Satyam Tiwari November 11, 2019 Get link Facebook X Pinterest Email Other Apps Comments Unknown8 April 2020 at 21:36Looking ✋ someReplyDeleteRepliesReplyAnonymous13 October 2022 at 02:41//name satyam tiwari//reg no 220970121//date//program 1#includeusing namespace std;class flight{int flight_num;float flight_dis,flight_fue;char flight_des[20];void calculate fule(){ if(flight_dis<= 1000) flight_fue=500; else if(flight_dis && flight_fue<=2000) flight_fue=1100; else if(flight_dis>2000) flight_fue=2200;}public:flight(){flight_dis=500;}void information_entry(){cout<<"enter flight number,destination name,distance";cin>>flight_num>>flight_des>>flight_dis;calculate fule();}void display_information() cout<<"flight name \t destination\t distance\tfule quntity"; cout<<flight_num<<"\t"<<flight_des<<"\t"<<flight_dis<<"\t"<<flight_fue;};int main{ flight object object.information_entry(); object.display_information(); return 0;}ReplyDeleteRepliesReplyAnonymous18 October 2022 at 01:015.1SELECT MAX(SAL) AS max_sal,MIN(SAL) AS min_sal,AVG(SAL) AS avg_sal,SUM(SAL) AS total_salary FROM EMP; 5.2SELECT P.PRJ_NAME FROM PROJ P,DEPT DWHERE P.DNO=D.DNO AND D.DNAME='Marketing';5.3SELECT UPPER(ENAME),LOWER(ENAME),UPPER(SUBSTR(ENAME,1,1)),LENGTH(ENAME),SUBSTR(ENAME,2,3) FROM EMP;5.4SELECT E.ENAME FROM EMP E,EMP MWHERE E.MGRID=M.EMPNO AND M.ENAME='RAGHU';5.5 SELECT DNAME,MAX(SAL) AS MAX_SALARY,MIN(SAL) AS MIN_SALARY FROM EMP E,DEPT DWHERE D.DNO=E.DEPTNO GROUP BY D.DNAME;5.6SELECT DNAME,COUNT(ENAME) AS NUMBER_EMPLOYEES FROM EMP E,DEPT DWHERE E.DEPTNO=D.DNOGROUP BY D.DNAME;5.7SELECT * FROM EMP WHERE (TO_CHAR(SYSDATE,'YYYY') - TO_CHAR(DATE_JOIN,'YYYY')) > 5;5.8SELECT * FROM EMP WHERE 'DEC'=TO_CHAR(DATE_BIRTH,'MON');5.9SELECT * FROM EMP WHERE TO_CHAR(DATE_BIRTH,'YYYY') = 1980;5.10SELECT TO_DATE(DATE_BIRTH,'DD-MM-YYYY') FROM EMP;5.11SELECT CEIL(2.83), FLOOR(2.83), TRUNC(2.83,0), ROUND(2.83) FROM DUAL;5.12SELECT * FROM PROJ WHERE (TO_CHAR(END_DATE,'YYYY') - TO_CHAR(STRT_DATE,'YYYY')) > 1 ;5.13UPDATE EMP SET COMM=COMM+SAL*0.1;ReplyDeleteRepliesReplyAdd commentLoad more... Post a Comment
Looking ✋ some
ReplyDelete//name satyam tiwari
ReplyDelete//reg no 220970121
//date
//program 1
#include
using namespace std;
class flight
{
int flight_num;
float flight_dis,flight_fue;
char flight_des[20];
void calculate fule()
{
if(flight_dis<= 1000)
flight_fue=500;
else if(flight_dis && flight_fue<=2000)
flight_fue=1100;
else if(flight_dis>2000)
flight_fue=2200;
}
public:
flight()
{
flight_dis=500;
}
void information_entry()
{
cout<<"enter flight number,destination name,distance";
cin>>flight_num>>flight_des>>flight_dis;
calculate fule();
}
void display_information()
cout<<"flight name \t destination\t distance\tfule quntity";
cout<<flight_num<<"\t"<<flight_des<<"\t"<<flight_dis<<"\t"<<flight_fue;
};
int main
{
flight object
object.information_entry();
object.display_information();
return 0;
}
5.1
ReplyDeleteSELECT MAX(SAL) AS max_sal,MIN(SAL) AS min_sal,AVG(SAL) AS avg_sal,SUM(SAL) AS total_salary FROM EMP;
5.2
SELECT P.PRJ_NAME FROM PROJ P,DEPT D
WHERE P.DNO=D.DNO AND D.DNAME='Marketing';
5.3
SELECT UPPER(ENAME),LOWER(ENAME),UPPER(SUBSTR(ENAME,1,1)),LENGTH(ENAME),SUBSTR(ENAME,2,3) FROM EMP;
5.4
SELECT E.ENAME FROM EMP E,EMP M
WHERE E.MGRID=M.EMPNO AND M.ENAME='RAGHU';
5.5
SELECT DNAME,MAX(SAL) AS MAX_SALARY,MIN(SAL) AS MIN_SALARY FROM EMP E,DEPT D
WHERE D.DNO=E.DEPTNO GROUP BY D.DNAME;
5.6
SELECT DNAME,COUNT(ENAME) AS NUMBER_EMPLOYEES FROM EMP E,DEPT D
WHERE E.DEPTNO=D.DNO
GROUP BY D.DNAME;
5.7
SELECT * FROM EMP WHERE (TO_CHAR(SYSDATE,'YYYY') - TO_CHAR(DATE_JOIN,'YYYY')) > 5;
5.8
SELECT * FROM EMP WHERE 'DEC'=TO_CHAR(DATE_BIRTH,'MON');
5.9
SELECT * FROM EMP WHERE TO_CHAR(DATE_BIRTH,'YYYY') = 1980;
5.10
SELECT TO_DATE(DATE_BIRTH,'DD-MM-YYYY') FROM EMP;
5.11
SELECT CEIL(2.83), FLOOR(2.83), TRUNC(2.83,0), ROUND(2.83) FROM DUAL;
5.12
SELECT * FROM PROJ WHERE (TO_CHAR(END_DATE,'YYYY') - TO_CHAR(STRT_DATE,'YYYY')) > 1 ;
5.13
UPDATE EMP SET COMM=COMM+SAL*0.1;