3

#1
#include<stdio.h>
#include<stdlib.h>

int main(void)
{
double a,b,c;
int m,n,p;
char c1, c2;
printf("intoduceti 3 numere reale\n");
if(scanf("%lf %lf %lf",&a,&b,&c)!=3)
{
printf("DE");
exit(1);
}
printf("introduceti 3 numere intregi\n");
if(scanf("%d %d %d",&m,&n,&p)!=3)
{
printf("DE");
exit(1);
}
printf("introduceti 2 caractere\n");
fflush(stdin);
scanf("%c %c", &c1,&c2);
printf("valorile introduse sunt: a=%g \t b=%g \tc=%g\t m=%d \tn=%d \tp=%d \tc1=%c \tc2=%c", a,b,c,m,n,p,c1,c2);
double max;
max=a;
if(b>max)
max=b;
if(c>max)
max=c;
if(m>max)
max=m;
if(n>max)
max=n;
if(p>max)
max=p;
printf("\nMaximul=%g\n", max);
int r;
r=m%(2*n);
printf("Restul este=%d\n", r);
if(n%2==0)
printf("numarul este par\n");
else if(n%2!=0)
printf("numarul este impar\n");

return 0;
}
cron