0% found this document useful (0 votes)
15 views

Programs

Uploaded by

Sanskar Aggarwal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Programs

Uploaded by

Sanskar Aggarwal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1) Prime No.

i <- 12
k <- 0
for(j in 2:(i/2)){
if(i%%j==0){
print('It is not prime')
k=1
break
}
}
if(k==0){
print('It is prime')
}
2)

You might also like