Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Chuong trinh sau se nhap vao tu ban phim 2 so nguyen
- // va hien thi ra man hinh tong va tich cua 2 so do
- #include<stdio.h>
- #include<conio.h>
- main()
- {
- // Khai bao cac bien trong chuong trinh
- float a, b;
- float tong, tich;
- // Nhap vao tu ban phim 2 so nguyen
- printf("\n Nhap vao so nguyen thu nhat: ");
- scanf("%d",&a);
- printf("\n Nhap vao so nguyen thu hai: ");
- scanf("%d",&b);
- // Tinh tong va tich cua 2 so vua nhap
- tong = a+b;
- tich = a*b;
- // Hien thi cac gia tri ra man hinh
- printf("\n Tong cua 2 so la %d", tong);
- printf("\n Tich cua 2 so la %d", tich);
- // An phim bat ki de ket thuc
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement