You are on page 1of 2

/*

#include <iostream>
#include <string.h>
using namespace std;
class Student {
char name[50];
int rollno;
double mark1, mark2, mark3 , average , total;
public :
void accept() {
cout << " enter the students name " << endl;
gets(name);
cout << "enter the rollno" << endl;
cin >> rollno;
cout << " enter the marks of the student " << endl;
cin >> mark1;
cin >> mark2;
cin >> mark3;
}
void result() {
total = (mark1 + mark2 + mark3);
average = total / 3;
if (average > 75)
cout << " DISTINCTION" << endl;
else
cout << "PASSED" << endl;
}
void display() {
cout << " your name is :" << name << endl;
cout << " your rollno :" << rollno << '\t';
cout << " total mark :" << total << '\t';
cout << " average :" << average << '\t';
}
};
void main() {
Student priya;
priya.accept();
priya.result();
priya.display();
int z;
cin >> z;
}
*/
/*
void accept(int A[100]) {
cout << " enter the array " << endl;
for (int i = 0; i < 100; i++) {
A[i] = i + 1;
cout << A[i] << '\t';
}
}
void compute(int A[100]) {
int f , k;
for (int i = 1; i < 100; i++) {
f = (100 / A[i]);
for (int j = i + 1; j <= f; j++) {
k = A[i] * j;
}
}
for (int i = 0; i < 100 && A[i] != 0; i++) {
cout << A[i] << '\t';
}
}
void main() {
int B[100];
accept(B);
compute(B);
int k;
cin >> k;
}
*/

You might also like