Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Program for calculate average of total marks:
#include
using namespace std;
void print(int marks_arr[],int cnt)
{
int ind[cnt];
int i=0;
int j=0;
int k=0;
int s=0;
for(k=0;k { ind[k]=0; } int cnt1=0; for(i=0;i { ind[cnt1]=1; for(j=i+1;j { //cout< if((marks_arr[i]==marks_arr[j])&&(marks_arr[i]!=-1)) { ind[cnt1]=ind[cnt1]+1; marks_arr[j]=-1; //if(marks_arr[j]==-1) //{ //break; //} } } cnt1++; } for(s=0;s { if(marks_arr[s]!=-1) { cout<<"\n"< } } } int add() { int mark; cout<<"Enter the mark:"; cin>> mark; return mark; } float avg(int mark[],int c) { int i,sum=0; float average; for(i=0;i { sum= sum+mark[i]; } average=sum/c; return average; } int marks_arr[100]; int main() { static int count=0; //int marks_arr[100], int choice,i,ch,searchelement,totalcount; float val; do { cout<<"\n 1.Add marks"; cout<<"\n 2.Display marks"; cout<<"\n 3.Find average"; cout<<"\n 4. Search marks "; cout<<"\n 5.Print"; cout<<"\nEnter choice : "; cin>>choice; switch(choice) { case 1: { marks_arr[count]=add(); count++; break; } case 2: { for(i=0;i { cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
ind[k]=0;
}
int cnt1=0;
for(i=0;i { ind[cnt1]=1; for(j=i+1;j { //cout< if((marks_arr[i]==marks_arr[j])&&(marks_arr[i]!=-1)) { ind[cnt1]=ind[cnt1]+1; marks_arr[j]=-1; //if(marks_arr[j]==-1) //{ //break; //} } } cnt1++; } for(s=0;s { if(marks_arr[s]!=-1) { cout<<"\n"< } } } int add() { int mark; cout<<"Enter the mark:"; cin>> mark; return mark; } float avg(int mark[],int c) { int i,sum=0; float average; for(i=0;i { sum= sum+mark[i]; } average=sum/c; return average; } int marks_arr[100]; int main() { static int count=0; //int marks_arr[100], int choice,i,ch,searchelement,totalcount; float val; do { cout<<"\n 1.Add marks"; cout<<"\n 2.Display marks"; cout<<"\n 3.Find average"; cout<<"\n 4. Search marks "; cout<<"\n 5.Print"; cout<<"\nEnter choice : "; cin>>choice; switch(choice) { case 1: { marks_arr[count]=add(); count++; break; } case 2: { for(i=0;i { cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
ind[cnt1]=1;
for(j=i+1;j { //cout< if((marks_arr[i]==marks_arr[j])&&(marks_arr[i]!=-1)) { ind[cnt1]=ind[cnt1]+1; marks_arr[j]=-1; //if(marks_arr[j]==-1) //{ //break; //} } } cnt1++; } for(s=0;s { if(marks_arr[s]!=-1) { cout<<"\n"< } } } int add() { int mark; cout<<"Enter the mark:"; cin>> mark; return mark; } float avg(int mark[],int c) { int i,sum=0; float average; for(i=0;i { sum= sum+mark[i]; } average=sum/c; return average; } int marks_arr[100]; int main() { static int count=0; //int marks_arr[100], int choice,i,ch,searchelement,totalcount; float val; do { cout<<"\n 1.Add marks"; cout<<"\n 2.Display marks"; cout<<"\n 3.Find average"; cout<<"\n 4. Search marks "; cout<<"\n 5.Print"; cout<<"\nEnter choice : "; cin>>choice; switch(choice) { case 1: { marks_arr[count]=add(); count++; break; } case 2: { for(i=0;i { cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
//cout< if((marks_arr[i]==marks_arr[j])&&(marks_arr[i]!=-1)) { ind[cnt1]=ind[cnt1]+1; marks_arr[j]=-1; //if(marks_arr[j]==-1) //{ //break; //} } } cnt1++; } for(s=0;s { if(marks_arr[s]!=-1) { cout<<"\n"< } } } int add() { int mark; cout<<"Enter the mark:"; cin>> mark; return mark; } float avg(int mark[],int c) { int i,sum=0; float average; for(i=0;i { sum= sum+mark[i]; } average=sum/c; return average; } int marks_arr[100]; int main() { static int count=0; //int marks_arr[100], int choice,i,ch,searchelement,totalcount; float val; do { cout<<"\n 1.Add marks"; cout<<"\n 2.Display marks"; cout<<"\n 3.Find average"; cout<<"\n 4. Search marks "; cout<<"\n 5.Print"; cout<<"\nEnter choice : "; cin>>choice; switch(choice) { case 1: { marks_arr[count]=add(); count++; break; } case 2: { for(i=0;i { cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
if((marks_arr[i]==marks_arr[j])&&(marks_arr[i]!=-1))
ind[cnt1]=ind[cnt1]+1;
marks_arr[j]=-1;
//if(marks_arr[j]==-1)
//{
//break;
//}
cnt1++;
for(s=0;s { if(marks_arr[s]!=-1) { cout<<"\n"< } } } int add() { int mark; cout<<"Enter the mark:"; cin>> mark; return mark; } float avg(int mark[],int c) { int i,sum=0; float average; for(i=0;i { sum= sum+mark[i]; } average=sum/c; return average; } int marks_arr[100]; int main() { static int count=0; //int marks_arr[100], int choice,i,ch,searchelement,totalcount; float val; do { cout<<"\n 1.Add marks"; cout<<"\n 2.Display marks"; cout<<"\n 3.Find average"; cout<<"\n 4. Search marks "; cout<<"\n 5.Print"; cout<<"\nEnter choice : "; cin>>choice; switch(choice) { case 1: { marks_arr[count]=add(); count++; break; } case 2: { for(i=0;i { cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
if(marks_arr[s]!=-1)
cout<<"\n"< } } } int add() { int mark; cout<<"Enter the mark:"; cin>> mark; return mark; } float avg(int mark[],int c) { int i,sum=0; float average; for(i=0;i { sum= sum+mark[i]; } average=sum/c; return average; } int marks_arr[100]; int main() { static int count=0; //int marks_arr[100], int choice,i,ch,searchelement,totalcount; float val; do { cout<<"\n 1.Add marks"; cout<<"\n 2.Display marks"; cout<<"\n 3.Find average"; cout<<"\n 4. Search marks "; cout<<"\n 5.Print"; cout<<"\nEnter choice : "; cin>>choice; switch(choice) { case 1: { marks_arr[count]=add(); count++; break; } case 2: { for(i=0;i { cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
int add()
int mark;
cout<<"Enter the mark:";
cin>> mark;
return mark;
float avg(int mark[],int c)
int i,sum=0;
float average;
for(i=0;i { sum= sum+mark[i]; } average=sum/c; return average; } int marks_arr[100]; int main() { static int count=0; //int marks_arr[100], int choice,i,ch,searchelement,totalcount; float val; do { cout<<"\n 1.Add marks"; cout<<"\n 2.Display marks"; cout<<"\n 3.Find average"; cout<<"\n 4. Search marks "; cout<<"\n 5.Print"; cout<<"\nEnter choice : "; cin>>choice; switch(choice) { case 1: { marks_arr[count]=add(); count++; break; } case 2: { for(i=0;i { cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
sum= sum+mark[i];
average=sum/c;
return average;
int marks_arr[100];
int main()
static int count=0;
//int marks_arr[100],
int choice,i,ch,searchelement,totalcount;
float val;
do
cout<<"\n 1.Add marks";
cout<<"\n 2.Display marks";
cout<<"\n 3.Find average";
cout<<"\n 4. Search marks ";
cout<<"\n 5.Print";
cout<<"\nEnter choice : ";
cin>>choice;
switch(choice)
case 1:
marks_arr[count]=add();
count++;
break;
case 2:
for(i=0;i { cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
cout< } break; } case 3: { val= avg(marks_arr,count); cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
case 3:
val= avg(marks_arr,count);
cout< break; } case 4: { cout<<"\n Enter the mark to search:"; cin>>searchelement; totalcount=0; for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
case 4:
cout<<"\n Enter the mark to search:";
cin>>searchelement;
totalcount=0;
for(i=0;i { if(marks_arr[i]==searchelement) { totalcount=totalcount+1; } } cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
if(marks_arr[i]==searchelement)
totalcount=totalcount+1;
cout<<"No of times the element is present : "< break; } case 5: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
case 5:
print(marks_arr,count);
cout<<"\nContinue [0-yes / 1-no] :";
cin>>ch;
}while(ch!=1);
a padovan string p(n) for a natural number n is defined as p(0)=''x'' p(1)=''y'' p(2)=''z'' p(n)=p(n-2)+p(n-3),n>2
Define the Double Data Type of c Language? The double is used to define BIG floating point numbers and it reserves twice the storage for the number. When the accuracy provided
Study the following class diagram, additional information and answer the questions that follow: MovieTicket movieName: string TicketPrice: doub
find area uder the curve y=f(x) between x=a and x=b #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; in
Differences between a pointer and a reference 1. A reference must always point to some object where as this restriction is not imposed on a pointer. e.g. int *pi = 0;
1. When developing this project in a Win32 Console Applications that includes the precompiled headers, enter in the Name: box, PRJ2[Your Full Last Name][Your First Initial] with no
explain the function of five elements that are found on a motherboard#
How do i write a code in C++ to bubblesort in linked list
pebblemerchant
What is the difference among a copy constructor and an overloaded assignment operator? Ans) A copy constructor constructs a latest object by using the content of the argument
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd