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 2 SO A VA B , TINH TONG HIEU TICH THUONG A VA B.

    float a, b;
	float tong , hieu, tich ,thuong ;
	printf("\nhay nhap a : ");
	scanf("%f",&a);
	printf("\nhay nhap b : ");
	scanf("%f",&b);

	tong = a + b;
	hieu = a - b;
	tich = a * b;
	thuong = a / b;

	printf("\n%f + %f = %f",a,b,tong);
	printf("\n%f - %f = %f",a,b,hieu);
	printf("\n%f * %f = %f",a,b,tich);
	b==0? printf("\nthi khong chia duoc"):printf("\n%f / %f = %f",a,b,thuong);	
	

   getch();
   return 0;


}

 

Revise this Paste

Parent: 116820
Your Name: Code Language: