Computer Science, asked by vsakshaykumar0p2poyh, 10 months ago

Please Help I really Need this work done . Don't Scam ❌

Write a program to find the netsalary and display the payslip of an employee by defining a structure with the details empcode,name,basicpay,da,hra &pf.(netsalary=basicpay+da+hra-pf)

Answers

Answered by Anonymous
5

#include<iostream.h>

#include<conio.h>

struct empo

{

int emp_code;

char name[20];

float basic_pay;

float da;

float hra;

float pf;

float net_salary;

};

void main( )

{

clrscr( );

empo A;

A. net_salary=A. basic_pay+A. da+A. hra-A. pf;

cout<<"name"<<A. name<<endl;

cout<<"empcode"<<A. emp_code<<endl;

cout<<"basicpay"<<A. basic_pay<<endl;

cout<<"da"<<A. da<<endl;

cout<<"hra"<<A. hra<<endl;

cout<<"pf"<<A. pf<<endl;

cout<<"netsalary"<<A. net_salary;

getch( );

}

Answered by Aryansingh001
2

Answer:

the upper ans is correct and my ans is same

Similar questions