Error unexpected in

0 votes
factor <- function(n){
print(paste("the factors of ",n,"are:"))
for(i in 1:n) {
if((n%i)==0) {
  print(i)
}
}
}
Apr 26, 2020 in Others by anirudh
• 120 points
203 views

1 answer to this question.

0 votes

Hey, @Anirudh,

Regarding your query, the if statement would need enclosing {} symbols.

This is a syntax error: Enclose your if in curly braces.

I hope this will work.

answered Apr 27, 2020 by Gitika
• 65,850 points

Related Questions In Others

0 votes
1 answer

Using unserialize in PHP throws the same error repeatedly

I googled 'Node no longer exists', and ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,240 points
802 views
+1 vote
1 answer

what is the difference between error and stderr in Node.js?

Error is an object created by Node.js to handle ...READ MORE

answered Jul 4, 2019 in Others by sunshine
• 1,280 points
1,078 views
0 votes
1 answer

Error cannot provide both a color and a decoration in Flutter container.

Hi@akhtar, The color and decoration arguments cannot both be supplied, since it ...READ MORE

answered Jul 29, 2020 in Others by MD
• 95,360 points
1,924 views
0 votes
1 answer

ERROR: You need elevated Administrator privileges in order to run this script.

Hi@akhtar, I guess you are trying to run ...READ MORE

answered Sep 8, 2020 in Others by MD
• 95,360 points
484 views
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer

Enabling SEO Optimizer in Magento 1.7 returns 404 error page on frontend links

Modified Magento's stock .htaccess to fit my ...READ MORE

answered Feb 10 in Others by narikkadan
• 10,640 points
95 views
0 votes
1 answer

Error: IllegalArgumentException: Unable to locate adb in Android Studio v2.3

when you try to move an Android project ...READ MORE

answered Dec 16, 2020 in Others by Gitika
• 65,850 points
1,663 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP