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; }
0 Answers
#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; }