Welcome to AMIE Study - AMIE India Students Forum

AMIE Study - AMIE India Students Forum

collapse collapse

* Shoutbox

Refresh History
  • kirannm: hii
    February 18, 2018, 03:39:53 PM
  • GCPATIL: Can I reregistration of section A done by online procedure
    January 30, 2018, 06:45:08 PM
  • girish_amie: Please upload electrical engineering latest question paper
    December 06, 2017, 09:25:40 AM
  • JYOTI VERMA: agr kisi ko apna exam city and center change krana hom to use kya krna chahiye plz suggest.
    October 14, 2017, 01:16:11 PM
  • JYOTI VERMA: amie ka exam center kaise change kr skte hai agr kiisi ko pta ho to plz btaiye .
    October 14, 2017, 01:15:31 PM
  • anoop.goyal9: error in online fee payment for winter 2017 examination
    October 12, 2017, 07:23:34 AM
  • ramajit: [link]
    October 06, 2017, 12:34:12 PM
  • ramajit: yes.. results announced... me 2/3 passed in Sec-B prodn Engg... xo xo... wow....
    October 06, 2017, 12:34:09 PM
  • suji.sujithraj: Guys check your results... its announced...!!!
    October 06, 2017, 10:26:53 AM
  • ramajit: summer'17 result will come or not ?
    October 06, 2017, 06:44:28 AM
  • jitu12341: Result has been declared ♡♡♡♡
    October 06, 2017, 06:30:56 AM
  • jitu12341: breaking news results will be publshed in March 18 along with winter 17
    October 04, 2017, 12:54:36 PM
  • ramajit: any tentative date aware about Summer'17 result
    October 03, 2017, 03:13:48 PM
  • nelokulood: What is the last date to apply for lab and project for winter 2017 session
    October 02, 2017, 11:39:31 AM
  • nelokulood: When will amie summer  2017 results be published
    October 02, 2017, 11:38:50 AM
  • SnrTech: please upgrade my membership to super member I already made payments Rs.500/- into bank account
    September 27, 2017, 11:17:12 PM
  • jitu12341: Is there anybody having EL 404, circuit and field theory notes  please mail on [email protected]
    September 23, 2017, 05:53:34 AM
  • jitu12341: Result is expected in first week of October
    September 23, 2017, 05:48:39 AM
  • manirock87: Result kab aayega for summer 2017
    September 22, 2017, 06:59:35 AM
  • mudassir.search007: Do i need to pay a separate fee for the Section A examination after paying the re-registration Fee (SEC A)
    September 20, 2017, 10:25:06 PM

* Search


* User Info

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

* Board Stats

  • stats Total Members: 48503
  • stats Total Posts: 27304
  • stats Total Topics: 6595
  • 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 946 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: 2171
  • 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
472 Views
Last post March 18, 2009, 03:48:16 PM
by rohit.wadhwa
1 Replies
4268 Views
Last post November 28, 2011, 07:18:22 PM
by praveen
3 Replies
902 Views
Last post February 07, 2011, 10:39:55 AM
by shitalbshinde
0 Replies
771 Views
Last post September 15, 2012, 04:48:54 PM
by jitu_12341
1 Replies
745 Views
Last post January 07, 2013, 08:01:52 PM
by spganeshk
1 Replies
836 Views
Last post January 07, 2013, 08:04:00 PM
by spganeshk
0 Replies
547 Views
Last post January 27, 2013, 08:40:28 PM
by arya

* Search

* Subscribe to Forum

Enter your email address:

Advertisement