#Include #Include Using Namespace Const Int Void Int Int Long Void Long Int For
#Include #Include Using Namespace Const Int Void Int Int Long Void Long Int For
#Include #Include Using Namespace Const Int Void Int Int Long Void Long Int For
#include<iostream>
#include<conio.h>
using namespace std;
const int size=5;
void main()
{
int number1[size],number2[size],k,i;
int result;
long n;
void digit(long,int);
cout<<"\nEnter "<<size<<" digits:";
for(i=0;i<size;i++)
{
cin >> number1[i];
cout<<number1[i]<<endl;
}
for(k=0;k<=4;k++)
{
number2[k]=number1[4-k];
cout<<number2[k]<<endl;
}
cout<<"\nterminating";
_getch();
#include <iostream>
#include <conio.h>
using namespace std;
void main ()
{
void digit (int , int);
long k;
int n;
cout << "Enter the positive integers:";
cin >> n;
if ( n>=0 )
{
cout << "Enter the value of k:";
cin >> k;
digit(n , k);
}
else
cout << "Please re-enter the positive integer:" << endl;
cout << "Press any key to exit..";
_getch();
}
void digit (int n, int k)
{
int num;
//lab6(2)
#include<iostream>
#include<conio.h>
#include<cmath>
using namespace std;
void main()
{
int m,n,s,i,sum=0,darab=1,multiply;
void Sum(int&,int&);
int Darab(int,int);
cout<<"\nEnter the value of integer for sum and darab:";
cin>>m>>n;
Sum(m,sum);
cout<<"\nThe summation of "<<m<<" integers is "<<sum<<".";
multiply=Darab(n,darab);
cout<<"\nThe multiplication of "<<n<<" integers is "<<multiply<<".";
s=sum+multiply;
cout<<"\nThe total value is "<<s<<"."<<endl;
cout<<"bye2 oni-chan..^_~"<<endl;
_getch();
//lab6(3)
#include<iostream>
#include<conio.h>
#include<cmath>
using namespace std;
void main()
{
int i;
int number[30]={1,3,5};
cout<<number[0]<<endl;
cout<<number[1]<<endl;
cout<<number[2]<<endl;
for(i=3;i<30;i++)
{
number[i]=number[i-1]+2;
cout<<number[i]<<endl;
}
cout<<"habes..."<<endl;
_getch();
}