Answer:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string names[5];
int votes[5];
for(int i=0;i<5;i++)
{
cout<<"Enter candidate name"<<endl;
getline(cin,names[i]);
cout<<"Enter candidate votes"<<endl;
cin >> votes[i];
cin.ignore();
}
int total_votes=0;
int max =-1;
int max_val=0;
for(int i=0;i<5;i++)
{
total_votes=total_votes+votes[i];
if(max_val<votes[i])
{
max_val=votes[i];
max=i;
}
}
cout<<"Total votes"<<total_votes<<endl;
for(int i=0;i<5;i++)
{
float per=(votes[i]/total_votes)*100;
cout<<"float per"<<per<<endl;
cout<<" "<<names[i]<<" "<<votes[i]<<" "<<per<<" %" <<endl;
}
cout<<"Winner is "<<names[max]<<" "<<votes[max]<<endl;
return 0;
}
Explanation:
Define a string array of size 5 for names. Define one integer array of size 5 for votes. Take input from user in loop for string array and int for votes.
In another loop find maximum of the list and sum all the votes. Store max votes index in max variable. In another loop display names along with their votes and percentage.
Display winner name and votes using max as index for name and votes array.
Dense Wavelength Division Multiplexing (DWDM)
Answer:
Explanation: A file could refer to any of the following; 1. A Linux command (working on a Linux OS) 2. An object on a computer that stores data, information, settings, or commands used with a computer program (i.e machine language).
In these case, we’re referring to the file used in machine language. The major difference between an object file and executable file is;
<em>An object file contains machine language directions, yet it doesn't contain code for any library schedules that might be essential. </em>
<em></em>
<em>An executable file is a program, prepared to run. It contains the machine language codes interpreted from the programmer’s source record, just as the code for any essential library schedules.</em>
Answer:
web portals
Explanation:
B2B (business-to-business) is a marketing strategy that deals with meeting the needs of other businesses, by selling products or services to the organizations for resale to other consumers, used in production of goods or for the operation of an organisation.
B2B (business-to-business) model focuses on facilitating sales transactions between businesses.
Under the B2B, the producer sells its products directly to other businesses such as wholesalers or retailers and not the end consumers.
B2B partners often connect to each other on the Internet through special web portals that are designed to facilitate exchange of information and simplified business transactions.
Additionally, a popular application of the seller-side marketplace model, which is a major business-to-business (B2B) e-commerce model, is e-procurement of goods through the use of web portals over the internet and as such eliminating the option of physical buying or procurement.
They get the idea from nature and then the make engineered systems.That is how they are similar.