G

@gayatrishelke

volume of different shapes using friend function

C++
2 years ago
#include<iostream> using namespace std; class Shape { private: int l, b, h; double r, h; public:

student result analysis using exception handling

C++
2 years ago
#include<iostream> using namespace std; class Analysis { int id; int res; public: void setData(int sid,int sres) {

student result analysis using inheritance

C++
2 years ago
#include<iostream> using namespace std; class Analysis { int id; int res; public: void setData(int sid,int sres) { id=sid;

student result analysis using friend function

C++
2 years ago
#include<iostream> using namespace std; class Analysis { int id; int res; public: void setData(int sid, int sres) { id = sid; res = sres;

power of number using inheritance

C++
2 years ago
#include<iostream> using namespace std; class Number { protected: double value; public: Number(double v) { value = v; }

power of number using friend function

C++
2 years ago
#include<iostream> using namespace std; class Number { private: double base; int power; public: Number(double b, int p) { base = b; power = p;

power of number using exception handling

C++
2 years ago
#include<iostream> using namespace std; class InvalidInputException : public exception { public: const char* what() const throw() { return "Invalid input. Please enter a valid number and a non-negative integer."; } }; double Power(double n,int p=2) {

average of 5 numbers using inheritance

C++
2 years ago
#include<iostream> using namespace std; class Calculator { protected: int n; int *arr; double sum; public: Calculator(int n) { this->n = n;

average of numbers using friend function

C++
2 years ago
#include<iostream> using namespace std; class SumAvg { private: int n; double sum; double avg; public:

average of five number using exception handling

C++
2 years ago
#include<iostream> #include<exception> using namespace std; int main () { int n,i,a; double sum=0; double avg=0; cout<<"\nEnter the no of elements:"<<endl;

query

MySQL
2 years ago
create table student(name varchar(20),age int, rollno int primary key,department varchar(10)); insert into student values("rsha",18,101,"IT"); insert into student values("Nisha",20,102,"CS"); insert into student values("Shaurya",23,103,"MECH"); insert into student values("Viraj",28,104,"IT"); select * from student; select * from student where age>20; select count(name) from student; select avg(age) from student; select min(age) from student;

array.c

C++
2 years ago
#include <iostream> using namespace std; class student { int roll_no; int result; public: void data(int roll_no,int result) {