Recent

Comments

Follow us on Facebook

Sunday, 31 December 2017

Define a structure student , first function takes the values and pass it to the second function as an argument to display them

- No comments

#include <iostream> using namespace std; struct student { char name [100]; int rollno; }; student value(student); void dispalydata(student); main() { student v;    v=value(v);    dispalydata(v); } student value(student s) { cout<<"enter your Good name ";...

Define a structure student and take values of the members in main and pass the structure to the function as an agrument to display the values

- No comments

 pass the structure to the function as an agrument to display the values #include <iostream> using namespace std; struct student { char name [30]; string  field; string  semester; int rollno; }; void dispalydata(student); main() { student...

Sunday, 24 December 2017

1. Write a function that is called by function main () and receives five integers. The function should print the sum of five integers and return the average to main. The average is printed in main.

- No comments

#include <iostream> using namespace std; main() { int avg (int,int,int,int,int); int a,b,c,d,e,z; cout<<"\nenter the five number for sum and avg  "; cin>>a>>b>>c>>d>>e; z=avg(a,b,c,d,e); cout<<"\nthe avg of five number is   =      "<<z; } int avg (int...

Tuesday, 19 December 2017

write a program to add,update,delete and quit the menu of an array using function in c++

- No comments

#include <iostream> using namespace std; int add(int a[]); int update(int a[]); int delet(int a[]); int main() { int arr[5]={0},ss,a,b,c,d,QUIT_CHOICE=4; cout<<"OPTIONS: "<<endl<<endl; ii: cout<<endl<<endl<<"press 1 for adding."<<endl; cout<<"press 2 for updating value."<<endl; cout<<"press 3 for deleting value."<<endl; cout<<"press...

Monday, 18 December 2017

how to sort integer array numbers/elements in Ascending Order in C++

- No comments

#include <iostream> using namespace std; #define MAX 100 int main() { //array declaration int arr[MAX]; int n,i,j; int temp; //read total number of elements to read cout<<"Enter total number of elements to read: "; cin>>n; //check bound...

Page 1 of 6123»

Write a program, that takes 16-Elements in Two-Dimensional-Array that has 4 rows & 4 columns, then display the diagonal of Matrix.

Write a program, that takes 16-Elements in Two-Dimensional-Array that has 4 rows & 4 columns, then display the diagonal of Matrix. ...

propeller ads

PropellerAds