Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Listing modul 4
1. #include <iostream>
#include<iostream>
Using namespace std;
Float s;
Int range (float v, float t, float a)
{
S=(v*t)-(0.5*a)*pow(t,2));
Return(s);
}
Int bil (float x )
{
If(s<0)
Cout<<”the value of s is a negative number”<<endl;
Else
Cout<<”the value of s is a positive number”<<endl;
Return 0;
}
Int main()
{
Float r,u ;
R=range (5,4,2);
Cout<<”the value of s is :”<<s<<endl;
U=bil(r);
Cout<<endl<<endl;
System (“pause”);
Return 0;
}
2. # include<iostream>
Using namespace std ;
}one. Two , three
Int formula (int &i, int &o, nt &p )
{int r;
R=(i+o)*p;
Return(r);
}
Struct number {
Int value ;
}one. Two , three;
Int main ()
{
Int *px,x,y;
Cout <<”insert your nuimber with three step ..!”<<endl;
Cout<<”number 1=”;
Cin>>one.value;
Cout<<”number 2=”;
Con>>two.value;
Cout<<”number 3=”;
Con>>three.value;
Cout<<endl;
X= formula (one. Value, two. Value, three.value);
Px=&;
Y=*px;
Cout<<”the addreaa of x=”<<&x<<endl;
3. Cout<<”content of px=”<<px<<endl;
Cout<<”content of x =”<<x<<endl;
Cout<<”the value in the px=”<<*px<<endl;
Cout <<”the value of y=”<<y<<endl;
System (“pause”);
Return 0;
}