Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <iostream>
- #include <math.h>
- using namespace std;
- //int x,y;
- //x=24;
- //y=80;
- int z,zi,c;
- char SK[18][40] = {" ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " "};
- main(){
- printf("Enter a value for Z: ");
- cin >> z;
- printf("\n");
- printf("Enter a value for C: ");
- cin >> c;
- printf("\n");
- for(int i=0;i<10;i++){
- zi=(z*z)+c;
- cout << "y: " << zi << " | x: " << z << "\n";
- for(int y=0;y<18;y++){
- for(int x=0;x<40;x++){
- SK[zi][z] = '*';
- }
- }
- z=zi;
- }
- cout << SK[18][40];
- }
Advertisement
Add Comment
Please, Sign In to add comment