URI 2060 : Bino’s Challenge

It is an easy program!

Source Code:


#include<stdio.h>
int main()
{
int i,n,a=0,b=0,c=0,d=0;
scanf(“%d”,&n);
int e;
for(i=0;i<n;i++)
{
scanf(“%d”,&e);
if(e%2==0)
a++;
if(e%3==0)
b++;
if(e%4==0)
c++;
if(e%5==0)
d++;

}

printf(“%d Multiplo(s) de 2\n”,a);
printf(“%d Multiplo(s) de 3\n”,b);
printf(“%d Multiplo(s) de 4\n”,c);
printf(“%d Multiplo(s) de 5\n”,d);
a=0,b=0,c=0,d=0;// for 2nd testcase,these parameters will initiated from 0

}

Advertisements

About waprogramming

I am in CSE,from CUET
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s