pl tell me the error the output i want is yes after 2 consecutive 5 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

pl tell me the error the output i want is yes after 2 consecutive 5

#include <stdio.h> int main() { int i,a[5]; for(i=0;i<=4;i++) { scanf("%d",&a[i]); if(a[i]==5) { if(a[i+1]==a[i]) { printf("yes"); } } } return 0; }

11th May 2020, 6:14 AM
Shubham Kharbanda
Shubham Kharbanda - avatar
0 Answers