thieumao

VD don gian dung Struct

Jul 16th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. struct tamgiac
  4. {
  5.     float a,b,c;
  6. } tg;
  7. void main(){
  8.     float tong;
  9.     printf("Nhap 3 cach trong tam giac: ");
  10.     scanf("%f%f%f",&tg.a,&tg.b,&tg.c);
  11.     tong = tg.a + tg.b + tg.c;
  12.     printf("Tong 3 canh la %f",tong);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment