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!
#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,total; float val; do { cout<<"\n 1. Add student marks"; cout<<"\n 2. Display student marks"; cout<<"\n 3. Find average of all marks"; cout<<"\n 4. Calculate the standard deviation"; cout<<"\n 5. Delete a student mark"; cout<<"\n 6. Search all marks "; cout<<"\n 7. Print all marks";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<< "The avg of total marks is: "< break; } case 4: case 5: case 6: { 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 7: { print(marks_arr,count); } } cout<<"\nContinue [0-yes / 1-no] :"; cin>>ch; }while(ch!=1); }
Question 1 . Write a brief note on Aggregation Question 2 . Discuss briefly on constructors Question 3 . What are the important advantages of Inheritance? Question 4 .
write a c program to find input string using strlen(), strcpy(), strcat(),strncat(), strcmp().
Write a C program "team.c" that maintains information for a soccer team. The program will allow you to add and delete players from your team, to search your team for players by nam
Reverse a string - C ++ program: Write a program in c to reverse a string. int main() { Stack theStack; String reverse("reverse"); cout
Problem : Luminous Jewels - Polishing Necklace Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of v
Object Initialization An object of a derived class can be initialized to an object of a base class. If both the classes have similar data members, then no specific constructor
Important questions
A: A dangling pointer arises while you use the address of an object after its lifetime is end. It may occur in situations such as returning addresses of automatic variables from a
The definition of an object(variable ): We can explain a variable(set memory to the variable) in the following ways. e.g. double salary; int month; When more than o
#questAt a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets wit
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