Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. // Chuong trinh sau se nhap vao tu ban phim 2 so nguyen
  2. // va hien thi ra man hinh tong va tich cua 2 so do
  3. #include<stdio.h>
  4. #include<conio.h>
  5. main()
  6. {
  7. // Khai bao cac bien trong chuong trinh
  8. float a, b;
  9. float tong, tich;
  10. // Nhap vao tu ban phim 2 so nguyen
  11. printf("\n Nhap vao so nguyen thu nhat: ");
  12. scanf("%d",&a);
  13. printf("\n Nhap vao so nguyen thu hai: ");
  14. scanf("%d",&b);
  15. // Tinh tong va tich cua 2 so vua nhap
  16. tong = a+b;
  17. tich = a*b;
  18. // Hien thi cac gia tri ra man hinh
  19. printf("\n Tong cua 2 so la %d", tong);
  20. printf("\n Tich cua 2 so la %d", tich);
  21. // An phim bat ki de ket thuc
  22. getch();
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement