65 792
Assignments Done
99,4%
Successfully Done
In October 2018

Answer to Question #39208 in C# for sawpno

Question #39208
what is the output:
#include <stdio.h>
int drive();
int main()
{
int a,b;
printf("Enter your Num");
scanf("%d", &a);
b=drive(a);
printf("%d\n", b);
return 0;
}

int drive(int p)
{
int q,r,s,t,count=0;
for (q=1;q<p;q++){
if (p%q == 0){
r=q; // if p=35 dn r=1,3,5,7//
for (s=2;s<r/2;s++){
if (r%s == 0){
count++;
}

}
if (count == 0 && r!=1)
t=r;

}

}
return t;
}
Expert's answer
Please upload your code to ge.tt or any other online fileshare websites and provide us with the link.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions