Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
/**Bismillahir Rahmanir Rahim.**/ #include <stdio.h> int main() { int N[1000], x, y,z; scanf ("%d", &x); for(y=0,z=0; y<1000; y++) { printf("N[%d] = %d\n",y,z); z++; if(z==x) z=0; } return 0; }
This comment has been removed by the author.
ReplyDeleteimport java.util.*;
ReplyDeletepublic class URI
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int[] N = new int[1000];
int T = sc.nextInt();
int c = 0;
int i = c;
for( ; cT)
{
i = 0;
}
}
for(int j = 0; j<N.length; ++j)
{
System.out.printf("%s%d%s%d%n","N[",j,"] = ",N[j]);
}
sc.close();
}
}
this is my code. it shows 100% wrong answer, though it runs on java. so what could be the problem?