SlideShare a Scribd company logo
1 of 1
Download to read offline
Use C programming
Make sure everything works only upload
Solution
C program
#include
int isPrime(int number);// function prototype
int main()
{
int No,i;// variable decleration
printf("Input a number greater than 2: ");// asking user to enter a number
scanf("%d",&No);// scaning the number form user
if(No <= 2)// checking no is lessthan or equ to 2
{ // if yes print message
printf("No prime number is smaller than %d. ",No);
return 0;// and stop computation
}
// else print the prime numbers
printf("Prime numbers smaller than %d:",No);
for (i = 2;i

More Related Content

More from rohit219406

The Blackbeard Company Ltd provided the following information in reg.pdf
The Blackbeard Company Ltd provided the following information in reg.pdfThe Blackbeard Company Ltd provided the following information in reg.pdf
The Blackbeard Company Ltd provided the following information in reg.pdf
rohit219406
 
Thank you 1. What is responsible for anteriorposterior axis formati.pdf
Thank you 1. What is responsible for anteriorposterior axis formati.pdfThank you 1. What is responsible for anteriorposterior axis formati.pdf
Thank you 1. What is responsible for anteriorposterior axis formati.pdf
rohit219406
 
Take the basic Hardy-Weinberg Equilibrium equation, where there are a.pdf
Take the basic Hardy-Weinberg Equilibrium equation, where there are a.pdfTake the basic Hardy-Weinberg Equilibrium equation, where there are a.pdf
Take the basic Hardy-Weinberg Equilibrium equation, where there are a.pdf
rohit219406
 
Systems analysis project 10 can you answer the 4 questions at the t.pdf
Systems analysis project 10 can you answer the 4 questions at the t.pdfSystems analysis project 10 can you answer the 4 questions at the t.pdf
Systems analysis project 10 can you answer the 4 questions at the t.pdf
rohit219406
 
Step 1. Read critically and analyze the following scenarioGeraldi.pdf
Step 1. Read critically and analyze the following scenarioGeraldi.pdfStep 1. Read critically and analyze the following scenarioGeraldi.pdf
Step 1. Read critically and analyze the following scenarioGeraldi.pdf
rohit219406
 
Microscopes and telescopes both consist of two converging lenses cont.pdf
Microscopes and telescopes both consist of two converging lenses cont.pdfMicroscopes and telescopes both consist of two converging lenses cont.pdf
Microscopes and telescopes both consist of two converging lenses cont.pdf
rohit219406
 
Know the function of the following cytokines and create a table IL-.pdf
Know the function of the following cytokines and create a table IL-.pdfKnow the function of the following cytokines and create a table IL-.pdf
Know the function of the following cytokines and create a table IL-.pdf
rohit219406
 
Japadog is the pioneer of street vending in Vancouver. They are uniq.pdf
Japadog is the pioneer of street vending in Vancouver. They are uniq.pdfJapadog is the pioneer of street vending in Vancouver. They are uniq.pdf
Japadog is the pioneer of street vending in Vancouver. They are uniq.pdf
rohit219406
 
In each of the following situations, identify one or more ways that .pdf
In each of the following situations, identify one or more ways that .pdfIn each of the following situations, identify one or more ways that .pdf
In each of the following situations, identify one or more ways that .pdf
rohit219406
 
Data Structures in C++I am really new to C++, so links are really .pdf
Data Structures in C++I am really new to C++, so links are really .pdfData Structures in C++I am really new to C++, so links are really .pdf
Data Structures in C++I am really new to C++, so links are really .pdf
rohit219406
 
How to secure information systemsSolutionAnswerInformation.pdf
How to secure information systemsSolutionAnswerInformation.pdfHow to secure information systemsSolutionAnswerInformation.pdf
How to secure information systemsSolutionAnswerInformation.pdf
rohit219406
 

More from rohit219406 (20)

Thoroughly describe the molecular underpinnings of ONE and only one.pdf
Thoroughly describe the molecular underpinnings of ONE and only one.pdfThoroughly describe the molecular underpinnings of ONE and only one.pdf
Thoroughly describe the molecular underpinnings of ONE and only one.pdf
 
The Blackbeard Company Ltd provided the following information in reg.pdf
The Blackbeard Company Ltd provided the following information in reg.pdfThe Blackbeard Company Ltd provided the following information in reg.pdf
The Blackbeard Company Ltd provided the following information in reg.pdf
 
Thank you 1. What is responsible for anteriorposterior axis formati.pdf
Thank you 1. What is responsible for anteriorposterior axis formati.pdfThank you 1. What is responsible for anteriorposterior axis formati.pdf
Thank you 1. What is responsible for anteriorposterior axis formati.pdf
 
Take the basic Hardy-Weinberg Equilibrium equation, where there are a.pdf
Take the basic Hardy-Weinberg Equilibrium equation, where there are a.pdfTake the basic Hardy-Weinberg Equilibrium equation, where there are a.pdf
Take the basic Hardy-Weinberg Equilibrium equation, where there are a.pdf
 
Systems analysis project 10 can you answer the 4 questions at the t.pdf
Systems analysis project 10 can you answer the 4 questions at the t.pdfSystems analysis project 10 can you answer the 4 questions at the t.pdf
Systems analysis project 10 can you answer the 4 questions at the t.pdf
 
Step 1. Read critically and analyze the following scenarioGeraldi.pdf
Step 1. Read critically and analyze the following scenarioGeraldi.pdfStep 1. Read critically and analyze the following scenarioGeraldi.pdf
Step 1. Read critically and analyze the following scenarioGeraldi.pdf
 
Question 3 2 pts In response to the Great Recession, the Federal Rese.pdf
Question 3 2 pts In response to the Great Recession, the Federal Rese.pdfQuestion 3 2 pts In response to the Great Recession, the Federal Rese.pdf
Question 3 2 pts In response to the Great Recession, the Federal Rese.pdf
 
Prove that the T_i -property is a topological property for i = 0S.pdf
Prove that the T_i -property is a topological property for i = 0S.pdfProve that the T_i -property is a topological property for i = 0S.pdf
Prove that the T_i -property is a topological property for i = 0S.pdf
 
Q4.14. Which of the following species is most likely to exhibit pate.pdf
Q4.14. Which of the following species is most likely to exhibit pate.pdfQ4.14. Which of the following species is most likely to exhibit pate.pdf
Q4.14. Which of the following species is most likely to exhibit pate.pdf
 
Prepare a classified balance sheet. Do not show the components that .pdf
Prepare a classified balance sheet. Do not show the components that .pdfPrepare a classified balance sheet. Do not show the components that .pdf
Prepare a classified balance sheet. Do not show the components that .pdf
 
Microscopes and telescopes both consist of two converging lenses cont.pdf
Microscopes and telescopes both consist of two converging lenses cont.pdfMicroscopes and telescopes both consist of two converging lenses cont.pdf
Microscopes and telescopes both consist of two converging lenses cont.pdf
 
Know the function of the following cytokines and create a table IL-.pdf
Know the function of the following cytokines and create a table IL-.pdfKnow the function of the following cytokines and create a table IL-.pdf
Know the function of the following cytokines and create a table IL-.pdf
 
IPv6 was developed to correct the limitation inherent in IPv4. What .pdf
IPv6 was developed to correct the limitation inherent in IPv4. What .pdfIPv6 was developed to correct the limitation inherent in IPv4. What .pdf
IPv6 was developed to correct the limitation inherent in IPv4. What .pdf
 
Japadog is the pioneer of street vending in Vancouver. They are uniq.pdf
Japadog is the pioneer of street vending in Vancouver. They are uniq.pdfJapadog is the pioneer of street vending in Vancouver. They are uniq.pdf
Japadog is the pioneer of street vending in Vancouver. They are uniq.pdf
 
In each of the following situations, identify one or more ways that .pdf
In each of the following situations, identify one or more ways that .pdfIn each of the following situations, identify one or more ways that .pdf
In each of the following situations, identify one or more ways that .pdf
 
I need to implment a function that can reverse a single linked list..pdf
I need to implment a function that can reverse a single linked list..pdfI need to implment a function that can reverse a single linked list..pdf
I need to implment a function that can reverse a single linked list..pdf
 
Data Structures in C++I am really new to C++, so links are really .pdf
Data Structures in C++I am really new to C++, so links are really .pdfData Structures in C++I am really new to C++, so links are really .pdf
Data Structures in C++I am really new to C++, so links are really .pdf
 
How to secure information systemsSolutionAnswerInformation.pdf
How to secure information systemsSolutionAnswerInformation.pdfHow to secure information systemsSolutionAnswerInformation.pdf
How to secure information systemsSolutionAnswerInformation.pdf
 
Explain the factors necessary to raising productivity. (Brief a.pdf
Explain the factors necessary to raising productivity. (Brief a.pdfExplain the factors necessary to raising productivity. (Brief a.pdf
Explain the factors necessary to raising productivity. (Brief a.pdf
 
Action of aggression the childrens play For an experiment compari.pdf
Action of aggression  the childrens play  For an experiment compari.pdfAction of aggression  the childrens play  For an experiment compari.pdf
Action of aggression the childrens play For an experiment compari.pdf
 

Recently uploaded

QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 

Use C programmingMake sure everything works only uploadSol.pdf

  • 1. Use C programming Make sure everything works only upload Solution C program #include int isPrime(int number);// function prototype int main() { int No,i;// variable decleration printf("Input a number greater than 2: ");// asking user to enter a number scanf("%d",&No);// scaning the number form user if(No <= 2)// checking no is lessthan or equ to 2 { // if yes print message printf("No prime number is smaller than %d. ",No); return 0;// and stop computation } // else print the prime numbers printf("Prime numbers smaller than %d:",No); for (i = 2;i