answersLogoWhite

0


Best Answer

#include<iostream.h>

#include<conio.h>

#include<string.h>

void swap(int *,int *);

class a

{

public:

char name[20],class[20];

int roll,s1,s2,s3,total;

void input()

{

cout<<"enter name==>";

cin>>name;

cout<<"enter roll no & marks in three subjects==>";

cin>>roll>>s1>>s2>>s3;

total=s1+s2+s3;

}

void print()

{

cout<<name;

cout<<"t"<<roll<<"/t"<<total;

}

}

s[50];

void main()

{

int i,n;

clrscr();

cout<<"enter no of student==>";

cin>>n;

cout<<"enter the into==>";

for(i=0;i<n;i++)

s[i].total==s[i=1].total)

{

if(p-1==0)

cout<<"1";

else

cout<<p-1;

}

else

cout<<p;

cout<<"\n";

p++;

}

getch();}

void swap(int *a,int *b)

{

int c=*a;

*a=*b;

*b=c;

}

void sqrt(int n)

{

int p,i;

char name[20];

for(p=1;p<n;p++)

for(i=0;i<n-p;i++)

if (s[i].total<s[i+t].total)

{

strcpy(sname,s[i].name);

strcpy(s[i].name,s[i+1].name);

strcpy(s[i+1].name,name);

swap(&s[i].roll,&s[i+1].roll);

swap(&s[i].s1,&s[i+1].s1);

swap(&s[i].s2.&s[i+1].s2);

swap(&s[i].s3,&s[i+1].s3);

swap(&s[i].total & s[i+1].total);

}

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a c program to find the rank of a student read the total mark from user?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


Where can one find information on becoming an exchange student?

One would be able to find information on becoming an exchange student from multiple sources such as senior students who have completed the exchange student program before, the teacher in charge of organising the exchange program, or from online websites that are dedicated to the exchange student program.


How do you write Square program using vb?

write a vb program to find the magic square


Write a C program to find occurrences of given character in a sentences?

unsigned find (const char* str, char c) { unsigned total; total = 0; if (str!=NULL) while (*str) { if (*str++==c) ++total; } return total; }


How do you write socket program in c?

For first find an example program.


Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


Write a c program to find eigenvalue of a matrix?

Yes, do write. That's what you always have to do when you have got a homework-program.


Does CitiBank have special programs for student banking?

CitiBank has a student banking program. On the web you can find it at CitiBank.com/Campus.


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you find out if your student loan has gone to collection?

The collector will write you a letter.


Write a c program to find Volume and surface area of cube?

Write a c program to compute the surface area and volume of a cube


Write c plus plus program to find all number from 112 to 212 with the cumulative total?

int total = 0; int n; for( n = 112; n &lt;= 212; ++n) { total += n; } printf("%d\n", total);