Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.

Paste

Pasted as C++ by registered user xujiayu ( 5 years ago )
#include <stdio.h>
#include <conio.h>

int main()
{
	//nhap vao so xe cua ban (gom toi da 5 chu so )cho biet so xe cua ban duoc may nut 
	int soxe1,soxe2,soxe3,soxe4,soxe5;
	printf("\nhay nhap so xe 1 : ");
	scanf("%d",&soxe1);
	printf("\nhay nhap so xe 2 : ");
	scanf("%d",&soxe2);
	printf("\nhay nhap so xe 3 : ");
	scanf("%d",&soxe3);
	printf("\nhay nhap so xe 4 : ");
	scanf("%d",&soxe4);
	printf("\nhay nhap so xe 5 : ");
	scanf("%d",&soxe5);
	int tong;
    tong = soxe1 + soxe2 + soxe3 + soxe4 + soxe5;
	printf("\n%d + %d + %d + %d + %d = %d",soxe1,soxe2,soxe3,soxe4,soxe5,tong);
	int x;
	x = tong / 10;
	printf("\ntinh so x : %d / 10 = %d ",tong,x);
	int sonut;
	sonut = (tong - x * 10);
	printf("\ntinh so nut : (%d - %d *10) = %d",tong,x,sonut);





	
	
	getch();
	return 0 ;

 

Revise this Paste

Your Name: Code Language: