diff --git a/vote_per_cal.cpp b/vote_per_cal.cpp new file mode 100644 index 0000000..cae808e --- /dev/null +++ b/vote_per_cal.cpp @@ -0,0 +1,42 @@ +/*1.Write a cpp program to calculate vote percentage if there are 3 nominess and 10 voters*/ + + #include + using namespace std; + int main(){ + + cout<<"To enter your vote select one of the candidate"<>vote[i]; + if(vote[i]==1) { + vote_utk++; + } + else if(vote[i]==2) + { + vote_vir++; + } + else if(vote[i]==3) + { + vote_sar++; + } + } + + float vote_per_utk=(vote_utk/10)*100; + float vote_per_vir=(vote_vir/10)*100; + float vote_per_sar=(vote_sar/10)*100; + cout<<"Vote Percentage of Utkarsh is"<<" "<