Fill out an array of as many as N random numbers from 0 - M
N and M entered, N <M do checks after input to ensure valid input
The numbers should not be twins.
Figures must criss-cross the even - odd (first figure may be even or odd)
Show the results
#include<stdio.h>
#include<stdlib.h>
#include<Windows.h>
#include<time.h>
#include<conio.h>
void main()
{
srand(time(NULL));
int n;
int m;
int nilai[100];
int temp;
printf("inputkan nilai bilangan :");
scanf("%d",&n);
printf("inputkan batas bilangan :");
scanf("%d",&m);
We don't always accept foreign languages in all cases.
So please translate your code into English if you want to get more helpful replies in the future.
#include<stdio.h>
#include<stdlib.h>
#include<Windows.h>
#include<time.h>
#include<conio.h>
void main()
{
srand(time(NULL));
int n;
int m;
int score[100];
int temp;
printf("input score :");
scanf("%d",&n);
printf("input limit :");
scanf("%d",&m);
The language of the identifiers is not a real issue. We see a lot of mysterious i,j,x,y. It is of course more intuitive, if the variable names are descriptive.