Minggu, 03 Juli 2011

student record in college using c++

A gramophone record, commonly known as a phonograph record (in American English), vinyl record (in reference to vinyl), or colloquially, a record, is an analog sound storage medium consisting of a flat disc with an inscribed, modulated spiral groove. The groove usually starts near the periphery and ends near the center of the disc (the opposite of the spiral of pits in the CD medium, which starts near the centre and works outwards). Phonograph records are generally described by the size of their diameter ("12-inch", "10-inch", "7-inch", etc.), the rotational speed at which they are played ("33⅓ r.p.m.", "78", "45", etc.), their time capacity ("Long Playing"), their reproductive accuracy, or "fidelity", or the number of channels of audio provided ("Mono", "Stereo", "Quadraphonic", etc.).

Gramophone records were the primary medium used for popular music reproduction for most of the 20th century, replacing the phonograph cylinder, with which it had co-existed, by the 1920s. By the late 1980s, digital media had gained a larger market share, and the vinyl record left the mainstream in 1991.[1][2] However, they continue to be manufactured and sold in the 21st century. The vinyl record regained popularity by 2008, with nearly 2.9 million units shipped that year, the most in any year since 1998.[3] They are especially used by DJs and audiophiles for many types of music. As of 2011, vinyl records continue to be used for distribution of independent and alternative music artists. More mainstream pop music releases tend to be mostly sold in compact disc or other digital formats, but have still been released in vinyl in certain instances.
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
#include<stdlib.h>
#include<iomanip.h>

class stud
{
int rno,dbms,c,cpp,vb,total;
char grade[5],name[10];
float avg;
public:
void getdata();
void putdata();
};

void stud::getdata()
{
char ch;
cout<<"Roll No.:" <<endl;
cin>>rno;
cin.get(ch);
cout<<" Name:" <<endl;
cin.getline(name,10);
cout<<"Marks of DBMS:"<<endl;
cin>>dbms;
cout<<"Marks of C:"<<endl;
cin>>c;
cout<<"Marks of CPP:"<<endl;
cin>>cpp;
cout<<"Marks of VB:"<<endl;
cin>>vb;
total=dbms+c+cpp+vb;
avg=total/4.0;

if(avg>=70)
strcpy(grade,"A+");
if(avg>60 && avg<=60)
strcpy(grade,"A");
if(avg>60 && avg<=55)
strcpy(grade,"B");
if(avg<55 && avg>=35)
strcpy(grade,"C");
if(avg<35)
strcpy(grade,"F");
}
void stud :: putdata()
{
cout<<setw(5)<<rno<<setw(10)<<name<<setw(5)<<dbms<<setw(5)<<c<<setw(5)<<cpp<<setw(5)<<vb<<setw(8)<<total<<setw(10)<<avg<<setw(8)<<grade<<"\n";
}
void main()
{
stud ob[2];
int i;
clrscr();
cout<<"Enter the record of student \n \n";
for(i=0;i<2;i++)
{ ob[i].getdata();
}
cout<<"Records of students:\n\n";
cout<<setw(5)<<"R_NO."<<setw(10)<<"NAME"<<setw(5)<<"DBMS"<<setw(5)<<"C"<<setw(5)<<"CPP"<<setw(5)<<"VB"<<setw(8)<<"TOTAL"<<setw(10)<<"AVG"<<setw(8)<<"GRADE"<<endl;
for(i=0;i<2;i++)
{
ob[i].putdata();
}
getch();
}

Tidak ada komentar:

Posting Komentar