Vous êtes sur la page 1sur 1

<html>

<head><title>Programme using "if" statement</title></head>


<body><p><b>
/*A programme using if statement */
#include <stdio.h>;
#include <coinio.h>;
main ( ) {
int a,b,c;
printf( Enter a);
scanf("%d",a);
printf (Enter b);
scanf("%d",b);
if(a>b) { c=a+b;
printf("%d",c); }
c=a-b;
prrintf ("%d",c\n);
return ( 0);
}
___________________________________________________________________
What the programme does is it gets two integer input a,b.If a happens to be grater
than b then it provides output c as the sum of the two numbers.But if a is less or
equal to b then it sets an output as the difference of the two numbers.</b></p>
</body>
</html>

Vous aimerez peut-être aussi