TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Md Nayeem
NA
75
23.9k
i wrote a program by using 2d array.Now i cannot understand
Nov 15 2017 11:53 PM
I wrote a program by using 2d array.Now i cannot understand where is the problem in this program:
#include <stdio.h>
main()
{
int i,j;
int arr[2][5]={{1,2,3,4,5},{6,7,8,9,10}};
for(i=0;i<10;i++){
int flag = 1;
if (arr[i][j] == 1) flag = 0;
{
for(j=2;j<=arr[i][j]/j;j++){
if (arr[i][j]%j == 0) {
flag = 0;
break;
}
}
if (flag)
printf("This is num:%d \n",arr[i][j]);
}
return 0;
}
}
Reply
Answers (
2
)
Where is the problem in this program?
How Can I execute code of c++ without VS