SlideShare une entreprise Scribd logo
1  sur  2
Need to write C code to program Ardunio to keep constant flow for below digram
Solution
int main()
{int increment=2;
int input_flow;
float valve_angle;
printf("enter the input flow");
scanf("%d",&input_flow)
printf("Enter an angle in degrees: ");
scanf("%f",&valve_angle);
if(valve_angle==180)
{cout<<"let the flow continue";
incrementer++;
}
else
{ cout<<" stop the flow here ,close valve";
increment--;
}
if(increment==1)
cout<<" no flow";
else
cout<<" let the flow move on";
}
}

Contenu connexe

Plus de todd971

Plus de todd971 (10)

Netting Process Bill report the following capital gains and losses for.docx
Netting Process Bill report the following capital gains and losses for.docxNetting Process Bill report the following capital gains and losses for.docx
Netting Process Bill report the following capital gains and losses for.docx
 
Neilson Company has monthly salaries of $22-000- Assume Neilson pays a.docx
Neilson Company has monthly salaries of $22-000- Assume Neilson pays a.docxNeilson Company has monthly salaries of $22-000- Assume Neilson pays a.docx
Neilson Company has monthly salaries of $22-000- Assume Neilson pays a.docx
 
Neuron cells generate electrical signals by concentration gradients ac.docx
Neuron cells generate electrical signals by concentration gradients ac.docxNeuron cells generate electrical signals by concentration gradients ac.docx
Neuron cells generate electrical signals by concentration gradients ac.docx
 
nest Rutherford was a prominent scientist who contributed significantl.docx
nest Rutherford was a prominent scientist who contributed significantl.docxnest Rutherford was a prominent scientist who contributed significantl.docx
nest Rutherford was a prominent scientist who contributed significantl.docx
 
Need some help!! Explain why all polynomial functions are continuou.docx
Need some help!!    Explain why all polynomial functions are continuou.docxNeed some help!!    Explain why all polynomial functions are continuou.docx
Need some help!! Explain why all polynomial functions are continuou.docx
 
On January 1- 2015- Alice Corporation had 20-000 shares of $6 par valu.docx
On January 1- 2015- Alice Corporation had 20-000 shares of $6 par valu.docxOn January 1- 2015- Alice Corporation had 20-000 shares of $6 par valu.docx
On January 1- 2015- Alice Corporation had 20-000 shares of $6 par valu.docx
 
On January 1- 2014- Richards Inc- had cash and common stock of $62-150.docx
On January 1- 2014- Richards Inc- had cash and common stock of $62-150.docxOn January 1- 2014- Richards Inc- had cash and common stock of $62-150.docx
On January 1- 2014- Richards Inc- had cash and common stock of $62-150.docx
 
On January 1- 2014- Jay Company had 10-000 shares of $1 par common sto.docx
On January 1- 2014- Jay Company had 10-000 shares of $1 par common sto.docxOn January 1- 2014- Jay Company had 10-000 shares of $1 par common sto.docx
On January 1- 2014- Jay Company had 10-000 shares of $1 par common sto.docx
 
On January 1- 2011- Phoenix Co- acquired 100 percent of the outstandin.docx
On January 1- 2011- Phoenix Co- acquired 100 percent of the outstandin.docxOn January 1- 2011- Phoenix Co- acquired 100 percent of the outstandin.docx
On January 1- 2011- Phoenix Co- acquired 100 percent of the outstandin.docx
 
On a circular track with 24 -elds two players Blue and Yellow place th.docx
On a circular track with 24 -elds two players Blue and Yellow place th.docxOn a circular track with 24 -elds two players Blue and Yellow place th.docx
On a circular track with 24 -elds two players Blue and Yellow place th.docx
 

Dernier

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Dernier (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

Need to write C code to program Ardunio to keep constant flow for belo.docx

  • 1. Need to write C code to program Ardunio to keep constant flow for below digram Solution int main() {int increment=2; int input_flow; float valve_angle; printf("enter the input flow"); scanf("%d",&input_flow) printf("Enter an angle in degrees: "); scanf("%f",&valve_angle); if(valve_angle==180) {cout<<"let the flow continue"; incrementer++; } else { cout<<" stop the flow here ,close valve"; increment--; }