Programming
Programming
× ★★★★★ GE T APP
4,000+ five-star reviews
home / study / engineering / computer science / computer science questions and answers / c...
C programming language
Bibi is a genius student from Binus computer science major, she wants to help her friends to understand
programming better and decides to write a problem for them, but she can't decide if her problem is easy
enough for her friends to solve. As she is also a very busy student, she needs your help in determining if
her problem is easy or not. Ironically, she has the time to ask N other genius friends on their opinion about
the problem she wrote. If no one considers the problem to be hard then the problem is easy, otherwise it is
not easy.
Format Input: The rst line in the input is an integer N, the number of genius friends Bibi asked. The
second line consists of N integers ai, their opinion on the problem. If ai is 1 then they think the problem is
hard, if ai is 0 then they think the problem is easy.
Format Output: Print "easy" (without quotes) if Bibi's problem is easy, print "not easy" (without quotes) if
Bibi's problem is not easy.
0 1 1 0 1 | not easy
Expert Answer
sweet123
answered this
Coding:
int main()
{
int N,i=0, ag=0;//Here declare relavent variable N is number of Friends, ag is for setting up wheater it is 0
or 1
scanf("%d",&N);//store value in N
printf("Opionion of %d:",i+1);//output
if( ag==0)
else
return 0;
Code snap:
if you still have any dout regarding this question please comment and if you like my code please
appreciate me by thumbs up thank you.........
0 Comments
0
Questions viewed by other students
A percentage differential relay with the characteristics shown by g 2 has been used on each phase of a
generator stator windings as shown by g1. The minimum pick up value is 0.15A and the slope "K" of
the operating characteristic line shown by g2 is K=0.1. A high resistance fault has occurred near the
grounded end of the stator winding as shown. The total value of fault and...
See answer
C programming language After preparing an easy problem, Bibi wants to pop balloons. Bibi can only
pop a balloon if her strength is strictly greater than the toughness of the balloon. Given her strength
and the toughness of the balloons, she wants you to predict how many balloons she can pop. Format
Input: The rst line of the input consists of two integers N and P, the number of...
See answer 100% (1 rating)
ABOUT CHEGG
CHEGG NETWORK
CUSTOMER SERVICE