Computer Science, asked by akhila843, 5 months ago

[0,4,8,13,17] have sum of digits divisible by 4 and <=20 sample input 1:
50
12
sample output 1:
3
sample explanation:
[0,39,48] have sum of digits divisible by 12 and <=50

Answers

Answered by yesiamin6
0

Answer:

#include<conio.h>

#include<stdio.h>

int main()

{

int a[]={0,4,8,13,17},i,j,r;

for(i=0;i<=4;i++)

{

for(j=i+1;j<=4;j++)

{r=0;

if(((a[i]+a[j])%4)==0)

{r=(a[i]+a[j])/4;}

if((r<=20)&&(r!=0))

{printf("%d\n",r);}

}

}

getch();

}

Explanation:

HOPE IT HELPS YOU

IF YOU LIKE THE ANSWERS DO FOLLOW FOR MORE PROGRAMS

MARK AS BRAINLIEST

OUTPUT HAS BEEN ATTACHED TO IT JUST WATCH IT

Attachments:
Similar questions