PF 1
PF 1
#include <iostream>
int main()
int num = 2;
if(num > 0) {
cout<<"Num is positive";
return 0;
#include <iostream>
int main()
{
int n = 10;
if (n % 2 == 0) {
return 0;
Write a C++ program to check if a person is eligible to vote (age >= 18)
#include <iostream>
int main()
cout<<"Eligible";
return 0;
Write a C++ program to check if a person passed an exam (marks >= 50)
#include <iostream>
cout<<"Student is passed";
return 0;
#include <iostream>
int main()
int n = 50;
if(n % 5 == 0){
return 0;
}
Write a C++ program to check if a number is positive or negative
#include <iostream>
int main()
int num = 2;
if(num > 0) {
cout<<"Num is positive";
else{
cout<<"Number is negative";
return 0;
#include <iostream>
int main()
int n = 10;
if (n % 2 == 0) {
Write a C++ program to check if a person is eligible to vote or not based on age
#include <iostream>
int main()
cout<<"Eligible";
else{
cout<<"Not eligible";
Write a C++ program to check if a student passed or failed based on marks (pass
if >= 50)
#include <iostream>
int main()
{
int marks = 80;
cout<<"Student is passed";
else{
cout<<"Student is failed";
#include <iostream>
int main()
int n = 12;
if(n % 3==0){
cout<<"Number is divisible";
else{