0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
|
Re:
[CODE] #include<iostream.h> #include<stdlib.h> struct rectInfo { int hight; int width; int area; int parimeter; void print() { cout<<hight<<" "<<width<<" "<<area<<" "<<parimeter<<endl; } }; void calArea(rectInfo *p,int n){ for(int i=0;i<n;i++){ p[i].area=p[i].hight*p[i].width; p[i].parimeter=2*(p[i].hight +p[i].width); } } void genData(rectInfo *p,int n) {for(int i=0;i<n;i++){ int a=rand()%10; int b=rand()%10; p[i].hight=a; p[i].width=b; } } int main() … |