Welcome to AMIE Study - AMIE India Students Forum

AMIE Study - AMIE India Students Forum

collapse collapse

* Shoutbox

Refresh History
  • vae: hi
    May 19, 2019, 03:21:54 PM
  • raviteja2412: I need mining engineering previous years question paper can anyone help me
    May 13, 2019, 06:20:39 PM
  • vae: Good afternoon every1
    May 09, 2019, 01:14:34 PM
  • vae: IMNA : EXCELLENT TUITIONS  136, First Floor, Above Raghavendra Enterprises, Coconut Avenue, 8th Cross, Malleswaram, Bangalore 560 003, India.  Phone: +91 9844027371
    May 02, 2019, 05:13:30 PM
  • vae: hellooooooooooooooooooooo
    May 02, 2019, 12:36:53 PM
  • vae: Shantanu09 - You can get the full notes if  U follow the link : [link]
    May 01, 2019, 12:44:07 PM
  • vae: Dear Shahul, kindly follow the link : [link] where you can get all details
    May 01, 2019, 12:42:37 PM
  • shantanu09: HLW everyone, can anyone send me notes for material scienece
    April 30, 2019, 05:43:38 PM
  • shahul: Any one can guide me, to join new membership ST (Diploma stream) by online???
    April 30, 2019, 04:30:47 PM
  • shahul: Good evening
    April 30, 2019, 04:29:18 PM
  • vae: Hi
    April 29, 2019, 12:42:11 PM
  • imna: i am looking for coaching class in Bangalore. Please I need guidance
    April 28, 2019, 09:42:40 AM
  • imna: hello anyone from bangalore?
    April 28, 2019, 09:37:41 AM
  • T-1700565: Please send AN 205 and AN 210 NOTES
    April 25, 2019, 10:06:09 PM
  • vae: Good Afternoon Everyone
    April 25, 2019, 10:36:29 AM
  • vae: Happy Easter Every1
    April 21, 2019, 12:53:46 PM
  • RK Electrical: Can anyone send me the fundamentals of design and manufacturing pdf book link?
    April 16, 2019, 10:29:00 PM
  • vae: Happy Vishu...Everyone
    April 15, 2019, 11:30:44 AM
  • vae: hello
    April 14, 2019, 12:45:51 PM
  • SUJEET KUMAR MISHRA: Good afternoon sir, mujhe sec-a, material science ka  notes  chahiye sir
    April 13, 2019, 10:40:49 AM

* Search


* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Board Stats

  • stats Total Members: 48882
  • stats Total Posts: 27507
  • stats Total Topics: 6656
  • stats Total Categories: 6
  • stats Total Boards: 31
  • stats Most Online: 626

Author Topic: PROGRAM TO FIND OUT WHETHER THE GIVEN NUMBER IS PRIME OR NOT  (Read 1275 times)

Description:
March 18, 2009, 04:28:52 PM
  • phpBB Moderator
  • Registered User
  • *
  • Posts: 56
    • View Profile
    • http://sites.google.com/a/daffodildb.com/study/Home
Advertisement
Code: [Select]
   
/* PROGRAM TO FIND OUT WHETHER THE GIVEN NUMBER IS PRIME OR NOT PRIME*/
     /* author-Rohit Wadhwa*/
     #include<stdio.h>
     #include<conio.h>
     void  main()
    {
    int n;
    int val;
    int i=2;
    int flag=1;
    printf("Enter a number Check for Prime or not prime:n");
    scanf("%d",&n);
    while(i<n)
    {
if(n%i==0) /*also there is a  2nd algo only replace with this if((n/2)%i==0)*/
        {
flag=0;
break;
}
i++;
    }
    if(flag==1)
     printf("%d is a prime number",n);
     else
     printf("%d is  not a prime number",n);
    getch();
    }
« Last Edit: January 01, 1970, 04:00:00 AM by Guest »


Thanks
Rohit Wadhwa
Site : Study Site
March 19, 2009, 07:51:33 AM
Reply #1
  • AMIE Forum Advisor
  • Senior Member
  • **
  • Posts: 820
    • View Profile
Thanks rohit for sharing Programming with us .
I would like to request u that can u make word document of all programms which u r having & send it to mail ID.we will upload it in FTP.It will be easier for all to refer.
Please if u can.
Komal
« Last Edit: January 01, 1970, 04:00:00 AM by Guest »
Komal Maskariya
AMIE (Chemical Engg)
Chartered Engineering, India
AMIE study notes
Excellence Academy
March 19, 2009, 08:29:59 AM
Reply #2
  • phpBB Moderator
  • Registered User
  • *
  • Posts: 56
    • View Profile
    • http://sites.google.com/a/daffodildb.com/study/Home
ok i am also include some program posted by parveen sir ,
actually i am make a document today( Wednesday ).
 i am share a Google Doc with you and update it time 2 time,
Wednesday i have some time so i make some program and post here!

so in my Google doc you find same program! if i have update i tell you

i am sharing with you ok!
« Last Edit: January 01, 1970, 04:00:00 AM by Guest »
Thanks
Rohit Wadhwa
Site : Study Site
March 19, 2009, 09:28:23 AM
Reply #3
  • phpBB Moderator
  • Registered User
  • *
  • Posts: 56
    • View Profile
    • http://sites.google.com/a/daffodildb.com/study/Home
As per your request, i send the docs to you
pls collect it.
And i am able to download the question paper but for reading, i have no password so please provide me the password as soon as possible .
Thanks in advance
« Last Edit: January 01, 1970, 04:00:00 AM by Guest »
Thanks
Rohit Wadhwa
Site : Study Site
March 19, 2009, 11:24:53 AM
Reply #4
  • Administrator
  • Senior Member
  • *****
  • Posts: 2173
  • Luck is for lazies, success is for who work hard
    • View Profile
    • AMIE Online Coaching
hI Rohit,
You can post programs as you posted in this topic, The category "Some Sample Programs " is only for discussing about the programs. so no problem just you can copy paste here..

Password has been provided with the post itself. check the post again. let me know if you have any password issue..

Thanks
Praveen
« Last Edit: January 01, 1970, 04:00:00 AM by Guest »
Praveen
AMIE Study
March 19, 2009, 01:14:51 PM
Reply #5
  • AMIE Forum Advisor
  • Senior Member
  • **
  • Posts: 820
    • View Profile
Praveen/Rohit,
Praveen ,it will be easier for the reader if it is in one document.
Anyway rohit u can post it whatever way u feel ok .

Komal
« Last Edit: January 01, 1970, 04:00:00 AM by Guest »
Komal Maskariya
AMIE (Chemical Engg)
Chartered Engineering, India
AMIE study notes
Excellence Academy
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
701 Views
Last post March 18, 2009, 03:48:16 PM
by rohit.wadhwa
1 Replies
4533 Views
Last post November 28, 2011, 07:18:22 PM
by praveen
3 Replies
1418 Views
Last post February 07, 2011, 10:39:55 AM
by shitalbshinde
0 Replies
929 Views
Last post September 15, 2012, 04:48:54 PM
by jitu_12341
1 Replies
1128 Views
Last post January 07, 2013, 08:01:52 PM
by spganeshk
1 Replies
1112 Views
Last post January 07, 2013, 08:04:00 PM
by spganeshk
0 Replies
692 Views
Last post January 27, 2013, 08:40:28 PM
by arya

* Search

* Subscribe to Forum

Enter your email address:

Advertisement

* Recent Posts

Solid Wood Dining Table Set Uk by arafats
[May 24, 2019, 05:35:06 PM]


Re: All About AMIE by vae
[May 09, 2019, 04:40:15 PM]


Re: All About AMIE by vae
[May 09, 2019, 04:26:26 PM]


Re: All About AMIE by vae
[May 09, 2019, 01:12:24 PM]


Re: All About AMIE by vae
[May 09, 2019, 01:03:32 PM]