谁会求三角形面积呀 求指教~
Write a C program using MPI to calculate the area of a triangle. The process with the rank: 0 sends two floating point numbers for the base and height to all other processes. Each of these processes calculate the area of the triangle and display.

area = b * h/2
The following is just a sample dialog. Your program must work for any floating point number.
Enter two floating point numbers for the base and the height of a triangle.
10 12
Height = 12.00, base = 10.00
The area of the triangle is: 60.00
Height = 12.00, base = 10.00
The area of the triangle is: 60.00
Height = 12.00, base = 10.00
The area of the triangle is: 60.00
Height = 12.00, base = 10.00
The area of the triangle is: 60.00
全部评论

相关推荐

不愿透露姓名的神秘牛友
07-16 12:18
点赞 评论 收藏
分享
鬼迹人途:你去投一投尚游游戏,服务器一面,第一个图算法,做完了给你一个策略题,你给出方案他就提出低概率问题,答不上当场给你挂
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-15 17:46
暑期就挂了,秋招还有机会吗
大聪明777:研发提前批,14号刚开的,官网上面的配图上有写。提前批没过的话,秋招还可以投,不过前面的笔试/面试记录会被保留,供秋招参考
26届校招投递进展
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务