1#include <iostream>
2using namespace std;
3int main(void) {
4 int n1=0,n2=1,n3,i,number,num,a,b,opt,x,y;
5 cout<<"enter your option";
6 cin>>opt;
7if(opt==1){
8 cout<<"Enter the number of elements: ";
9 cin>>number;
10 cout<<n1<<" "<<n2<<" "; //printing 0 and 1
11 for(i=2;i<number;++i) //loop starts from 2 because 0 and 1 are already printed
12 {
13 n3=n1+n2;
14 cout<<n3<<" ";
15 n1=n2;
16 n2=n3;
17 }
18}
19else if(opt==2) {
20
21 for( a = 1; a <= 5; ++a)
22 {
23 for( b = 1; b <= a; ++b)
24 {
25 cout << "* ";
26 }
27 cout << "\n";
28 }
29
30} else if(opt==3){
31 cout<<"Enter X coordinate";
32 cin>>x;
33 cout<<"Enter y coordinate";
34
35
36 //checking for quadrants and axis
37 if(x==0)
38 cout<< "lies on y axis";
39 else if(y==0)
40 cout<< "lies on x axis";
41 else if(x>0&&y>0)
42 cout<< "lies in 1st quadrant";
43 else if(x<0&&y>0)
44 cout<<"lies in 2nd quadrant";
45 else if(x<0&&y<0)
46 cout<<"lies in 3rd quadrant";
47 else if(x>0&&y<0)
48 cout<<"lies in 4th quadrant";
49 else
50 cout<<"lies on the origin";
51 }
52 return 0;
53 }
1#include <stdio.h>
2#include <stdlib.h>
3
4int main(void)
5{
6 printf("Olá Mundo!\n");
7 return 0;
8}
1int myHack (int x) {
2 int i=100;
3 int y=50;
4 while (i>0){
5 if (y<100) {
6 y = y * 2;
7 }else{
8 y = func(x, y);
9 x++;
10 }
11 i--;
12 }
13 return y;
14}