## Employee Salary+Budget+Bonus Calculator – Algorithms & Data Structures in C++

#include<iostream> using namespace std; void calculatesalary(float salary[],int salarysize,float budget[],int budgetsize,int bonus[],int bonussize){ for(int x=0;x<=2;x++) { cout<<“\nEmployee”<<x+1<<” “<<“\nEnter salary”; cin>>salary[x]; salary[x]=salary[x]+(salary[x]*budget[x]/100)+(salary[x]*bonus[x]/100);} for(int x=0;x<=2;x++){ cout<<“SALARy is”<<x+1<<” “<<salary[x]<<endl;} } int main() { float salary[]={0,0,0}; float budget[]={12.5,13,15}; int bonus[]={20,15,5}; calculatesalary(salary,3,budget,3,bonus,3); return 0; }

## Array in Digits Concept – Algorithms & Data Structures in C++

#include<iostream> using namespace std; int main(){ int a[10]={1,2,3,4,5,6,7,8,9,10}; int c; for(int a=1;a<10;a++){ if(c==5) cout<<“five”;} return 0; }

## Student Data – Algorithms & Data Structures in C++

#include<iostream> using namespace std; int main(){ const int noofstudent=1; int marks; const int noofsubjects=6; int stmarks[1][6]; int rollno=53; rollno=rollno+1; cout<<rollno; for(int student=0;student<noofsubjects;student++){ for(int subjects=0;subjects<noofsubjects;subjects++){ cout<<“enter marks for subjects”<<subjects+1<<endl; cin>>stmarks[1][6]; } } for(int student=0;student<noofsubjects;student++){ for(int subjects=0;subjects<noofsubjects;subjects++){ cout<<“subject marks”<<subjects+1<<“”<<stmarks[1][6]<<endl;} cout<<endl;} return 0; }