Professional Documents
Culture Documents
Pplassignment 1
Pplassignment 1
Pplassignment 1
Assignment-1
Program Name: BT-CSE-I-45&46
Semester: I
Course Name: PPL Max. Marks: 20
Course Code: CSEG 1010 Due Date: 11th DEC, 2022
Q2. Write an algorithm to find the roots of quadratic equation and make a flowchart of it.
a. #include <stdio.h>
int main()
{
int x;
x = 10;
if(x > 10)
x -= 10;
else if(x >= 0)
x += 00;
else if(x)
x += 10;
else
x -= 10;
printf("%d\n",x);
return 0;
}
b. #include <iostream>
using namespace std;
int main()
{
int count = 0;
for (;;) {
if (count == 10)
break;
printf("%d ", ++count);
}
return 0; }