fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <stdlib.h>
  4. #include <unistd.h>
  5. void cubic();
  6. int main()
  7. { int i; // menu integer
  8. printf("𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .\n");
  9. printf("[..........]0%% \n");
  10. sleep(1);
  11. printf("\033[2J\033[H");
  12. printf("𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .\n");
  13. printf("[###.......]30%%\n");
  14. sleep(1);
  15. printf("\033[2J\033[H");
  16. printf("𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .\n");
  17. printf("[#####.....]50%%\n");
  18. sleep(1);
  19. printf("\033[2J\033[H");
  20. printf("𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .\n");
  21. printf("[########..]80%%\n");
  22. sleep(1);
  23. printf("\033[2J\033[H");
  24. printf("𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .\n");
  25. printf("[##########]100%% \n");
  26. sleep(1);
  27. printf("\033[2J\033[H");
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. char back,q;
  37. float a,p,b,n,t,c,j,g,v,sum,totalinterest,bhag,biyog,goon,r,area,x1,x2,password,total;
  38. //integer is shit always use float
  39. printf("welcome to idk what calculator(v6+)\n\n\n");
  40. printf(" |\\_/| \n");
  41. printf(" | @ @ <--kutta!\n");
  42. printf(" | <> \n");
  43. printf(" | _/\\----. \n");
  44. printf(" | \n");
  45. printf(" | \n");
  46. printf("************************************\n");
  47. printf("designed by saif at 4am \n");
  48. printf("#don't enter anything besides numbers.\n");
  49. printf("#can calculate negative numbers.\n");
  50. printf("#should be able to calculate near infinity.\n");
  51. printf("#decimals upto 4\n");
  52. printf("*bug bhalluk: u tell me.\n\n");
  53. printf("************************************\n");
  54. printf("navigate by entering numbers\n");
  55. menu:
  56. printf("[0]exit\n");
  57. printf("[1]jug numbers(+)(max 10 numbers)\n");
  58. printf("[2]bhag numbers(/)(inf means infinity)\n");
  59. printf("[3]goon numbers(x)\n" );
  60. printf("[4]biyog numbers(-)\n");
  61. printf("[5]area of a circle(m^2)\n");
  62. printf("[6]quadratic solver(nan means imaginary)\n");
  63. printf("[12]cubic function root with 1 real root given");
  64. printf("[7]interest calcuator(normal. not compound)\n");
  65. printf("[8]very much hidden menu(very hard password)\n");
  66. printf("[9]sum of 1 to n th number(idk what's the term for it)\n");
  67. printf("[10] random ASCII art \n");
  68. printf("[11] ok. \n");
  69. printf("[100] given up projects\n");
  70. printf("Your wish?-\n");
  71.  
  72. scanf("%d",&i);
  73. if(i==100) {
  74. printf("\033[2J\033[H");
  75. printf("Given up projects-\n1/age calculator(can calculate only years not days)\n");
  76. printf("2/ GUI. one day with c++\n");
  77. printf("3/ building a apk. kotlin is too tough\n");
  78. printf("4/optimizing this shitty code.v6 has 216 lines. easily can be made under 100. but this thing is useless as c is to restricted\n");
  79. printf("enter q to go back to menu\n");
  80. scanf(" %c", &q);
  81. if(q=='q') {
  82. printf("\033[2J\033[H");
  83. goto menu;}
  84. }
  85. if(i==0) {
  86.  
  87. sleep(2);
  88. printf("\033[2J\033[H");
  89. printf("bye");
  90. exit(0);}
  91.  
  92. if(i==1) {
  93. printf("\033[2J\033[H");
  94. float g[10] = {0};
  95. printf("┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋┏┓╋╋╋╋╋╋┏┓╋╋╋┏┓\n");
  96. printf("┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┃┃╋╋╋╋╋╋┃┃╋╋┏┛┗┓\n");
  97. printf("┃┗━━┳┓┏┳┓┏┓┏━━┳━━┫┃┏━━┳┓┏┫┃┏━┻┓┏╋━━┳━┓\n");
  98. printf("┗━━┓┃┃┃┃┗┛┃┃┏━┫┏┓┃┃┃┏━┫┃┃┃┃┃┏┓┃┃┃┏┓┃┏┛\n");
  99. printf("┃┗━┛┃┗┛┃┃┃┃┃┗━┫┏┓┃┗┫┗━┫┗┛┃┗┫┏┓┃┗┫┗┛┃┃\n");
  100. printf("┗━━━┻━━┻┻┻┛┗━━┻┛┗┻━┻━━┻━━┻━┻┛┗┻━┻━━┻┛\n");
  101.  
  102.  
  103. printf("sum of upto 10 numbers. entering 0 stops and sums all given numbers.\n");
  104. printf("your 1st number here-\n");
  105. scanf("%f",&g[0]);
  106. printf("+");
  107. scanf("%f",&g[1]);
  108. if(g[1]==0) {
  109. goto hard; }
  110. printf("+");
  111. scanf("%f",&g[2]);
  112. if(g[2]==0) {
  113. goto hard; }
  114. printf("+");
  115. scanf("%f",&g[3]);
  116. if(g[3]==0) {
  117. goto hard; }
  118. printf("+");
  119. scanf("%f",&g[4]);
  120. if(g[4]==0) {
  121. goto hard; }
  122. printf("+");
  123. scanf("%f",&g[5]);
  124. if(g[5]==0) {
  125. goto hard; }
  126. printf("+");
  127. scanf("%f",&g[6]);
  128. if(g[6]==0) {
  129. goto hard; }
  130. printf("+");
  131. scanf("%f",&g[7]);
  132. if(g[7]==0) {
  133. goto hard; }
  134. printf("+");
  135. scanf("%f",&g[8]);
  136. if(g[8]==0) {
  137. goto hard; }
  138. printf("+");
  139. scanf("%f",&g[9]);
  140.  
  141.  
  142. hard :
  143. sum=g[0]+g[1]+g[2]+g[3]+g[4]+g[5]+g[6]+g[7]+g[8]+g[9];
  144. printf("************************************\n");
  145. printf("result section\n");
  146. printf("mut=%f\n",sum);
  147. printf("************************************\n");
  148. printf("enter q to go back to menu\n");
  149. scanf(" %c", &q);
  150. if(q=='q') {
  151. printf("\033[2J\033[H");
  152. goto menu;}
  153.  
  154. }
  155.  
  156. if(i==2) {
  157. printf("\033[2J\033[H");
  158. printf("=====================================\n");
  159. printf("|| DIVISION CALCULATOR ||\n");
  160. printf("=====================================\n");
  161. printf("enter your 1st number here \n");
  162. scanf("%f",&a);
  163.  
  164. printf("enter the last number and let me rest\n");
  165. scanf("%f",&b);
  166. bhag=(float)a/b;
  167. printf("here you go stpuid \n");
  168. printf("************************************\n");
  169. printf("result section\n");
  170. printf("bhag=%.3f\n",bhag);
  171. printf("************************************\n");
  172.  
  173.  
  174. printf("enter q to go back to menu\n");
  175. scanf(" %c", &q);
  176. if(q=='q') {
  177. printf("\033[2J\033[H");
  178. goto menu;};
  179.  
  180. if(b==0) {
  181. printf("\033[2J\033[H");
  182. printf("************************************\n");
  183. printf("idiot\n");
  184. printf("************************************\n");
  185. printf("enter q to go back to menu\n");
  186. scanf(" %c", &q);
  187. if(q=='q') {
  188. printf("\033[2J\033[H");
  189. goto menu;};
  190. }}
  191.  
  192. if(i==3) {
  193. printf("\033[2J\033[H");
  194. printf("=====================================\n");
  195. printf("|| MUTIPLICATION CALCULATOR ||\n");
  196. printf("=====================================\n");
  197. printf("1st number \n");
  198. scanf("%f",&a);
  199. printf("2nd number \n");
  200. scanf("%f",&b);
  201. goon=(float)a*b;
  202. printf("************************************\n");
  203. printf("goon=%.4f\n",goon);
  204. printf("************************************\n");
  205. printf("enter q to go back to menu\n");
  206. scanf(" %c", &q);
  207. if(q=='q') {
  208. printf("\033[2J\033[H");
  209. goto menu;};
  210. }
  211. if(i==4) {
  212. printf("\033[2J\033[H");
  213. printf("=====================================\n");
  214. printf("|| SUBTRACTION CALCULATOR ||\n");
  215. printf("=====================================\n");
  216. printf("enter the 1st number here \n");
  217. scanf("%f",&a);
  218. printf("enter last number here-\n");
  219. scanf("%f",&b);
  220. biyog=(float)a-b;
  221. printf("************************************\n");
  222. printf("biyog=%.4f\n",biyog);
  223. printf("************************************\n");
  224. printf("enter q to go back to menu\n");
  225. scanf(" %c", &q);
  226. if(q=='q') {
  227. printf("\033[2J\033[H");
  228. goto menu;};
  229.  
  230. }
  231.  
  232. if(i==5) {
  233. printf("\033[2J\033[H");
  234. printf("area of a circle\n");
  235. printf(" ******** \n");
  236. printf(" ** ** \n");
  237. printf(" ** R ** \n");
  238. printf(" * ©------>* \n");
  239. printf(" ** ** \n");
  240. printf(" ** ** \n");
  241. printf(" ****** \n");
  242.  
  243. printf("enter radius(In meter)=\n");
  244. scanf("%f",&r);
  245. area=3.14159*(float)r;
  246. printf("************************************\n");
  247. printf("area(m²)=%.4f\n",area);
  248. printf("************************************\n");
  249. printf("enter q to go back to menu\n");
  250. scanf(" %c", &q);
  251. if(q=='q') {
  252. printf("\033[2J\033[H");
  253. goto menu;};
  254.  
  255. }
  256. if(i==6) {
  257. printf("\033[2J\033[H");
  258. printf("ax²+bx+c=0.\n");
  259. printf("a=?\n");
  260. scanf("%f",&a);
  261. printf("b=?\n");
  262. scanf("%f",&b);
  263. printf("c=?\n");
  264. scanf("%f",&c);
  265. x1= (-b+ sqrt(b*b-4*a*c) )/2*a;
  266. printf("************************************\n");
  267. printf("x1=%.4f\n",x1);
  268. x2= (-b- sqrt(b*b-4*a*c) )/2*a;
  269. printf("x2=%.4f\n",x2);
  270. printf("************************************\n");
  271. printf("enter q to go back to menu\n");
  272. scanf(" %c", &q);
  273. if(q=='q') {
  274. printf("\033[2J\033[H");
  275. goto menu;};
  276.  
  277. }
  278.  
  279. if(i==7) {
  280. printf("\033[2J\033[H");
  281. printf(" INTREST CALCULATOR \n");
  282. printf("⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n");
  283. printf("⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣿⣿⣷⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n");
  284. printf("⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⠋⣉⣉⠙⣿⣿⣿⣷⣦⣀⠀⠀⠀⠀⠀⠀⠀\n");
  285. printf("⠀⠀⠀⢀⣤⣶⣿⣿⣿⣿⣿⣿⣿⠀⣿⣿⠀⣿⣿⣿⣿⣿⣿⣿⣶⣤⡀⠀⠀⠀\n");
  286. printf("⠀⠀⠀⣤⣤⣤⣤⣤⡄⠀⠀⠀⢀⣠⣿⣿⣤⣤⣄⡀⠀⢠⣤⣤⣤⣤⣤⠀⠀⠀\n");
  287. printf("⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⢀⣴⣿⡿⠛⠛⠛⠛⠛⠇⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀\n");
  288. printf("⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⣸⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀\n");
  289. printf("⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⣿⣿ bank⢠⣤⣤⣤⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀\n");
  290. printf("⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⢹⣿⣆⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀\n");
  291. printf("⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀⠻⣿⣷⣤⣤⣤⣤⣾⣿⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀\n");
  292. printf("⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀⠀⠈⠙⣿⣿⠛⠛⠉⠁⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀\n");
  293. printf("⠀⠀⠀⠛⠛⠛⠛⠛⠃⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⠘⠛⠛⠛⠛⠛⠀⠀⠀\n");
  294. printf("⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠉⠉⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀\n");
  295. printf("⠀⢰⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⡆⠀\n");
  296. printf("⠀⠈⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁⠀\n");
  297.  
  298.  
  299.  
  300.  
  301. printf("enter principle\n");
  302. scanf("%f",&p);
  303. printf("rate(per year)-\n");
  304. scanf("%f",&r);
  305. printf("time(year)-\n");
  306. scanf("%f",&t);
  307. totalinterest=p*(r/100)*t;
  308. printf("total interest=%0.4f\n",totalinterest);
  309. printf("************************************\n");
  310. printf("enter q to go back to menu\n");
  311. scanf(" %c", &q);
  312. if(q=='q') {
  313. printf("\033[2J\033[H");
  314. goto menu;};
  315.  
  316. }
  317. if(i==8) { printf("\033[2J\033[H");
  318. printf("╭╮╱╭╮╱╱╭╮╱╭╮\n");
  319. printf("┃┃╱┃┃╱╱┃┃╱┃┃\n");
  320. printf("┃╰━╯┣┳━╯┣━╯┣━━┳━╮╱╭╮╭┳━━┳━╮╭╮╭╮\n");
  321. printf("┃╭━╮┣┫╭╮┃╭╮┃┃━┫╭╮╮┃╰╯┃┃━┫╭╮┫┃┃┃\n");
  322. printf("┃┃╱┃┃┃╰╯┃╰╯┃┃━┫┃┃┃┃┃┃┃┃━┫┃┃┃╰╯┃\n");
  323. printf("╰╯╱╰┻┻━━┻━━┻━━┻╯╰╯╰┻┻┻━━┻╯╰┻━━╯\n");
  324. printf("enter password\n");
  325. scanf("%f",&password);
  326. if(password==1234){ printf("u a smart fella or fart smella?\n\n");
  327. printf("made with vscode,dev c\\c++, coding c(on my tab and blurry crt)\n");
  328. printf("************************************\n");
  329. }
  330. else printf("womp womp, wrong password\n");
  331. printf("enter q to go back to menu\n");
  332. scanf(" %c", &q);
  333. if(q=='q') {printf("\033[2J\033[H");
  334. goto menu;};
  335.  
  336. }
  337. if(i==9) {
  338. printf("\033[2J\033[H");
  339. printf("1+2+3+4+......+n\n"); printf("whats n= ?\n");
  340. scanf("%f",&n);
  341. total=(n*(n+1))/2;
  342. printf("total=%0.4f\n",total);
  343. printf("************************************\n");
  344. printf("enter q to go back to menu\n");
  345. scanf(" %c", &q);
  346. if(q=='q') {
  347. printf("\033[2J\033[H");
  348. goto menu;};
  349.  
  350. }
  351. if (i==10) {
  352. printf("\033[2J\033[H");
  353. printf("⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣾⡿⠿⢿⣦⡀⠀⠀⠀⠀⠀⠀\n");
  354. printf("⠀⠀⢀⣶⣿⣶⣶⣶⣦⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⠟⠁⣀⣤⡄⢹⣷⡀⠀⠀⠀⠀⠀\n");
  355. printf("⠀⠀⢸⣿⡧⠤⠤⣌⣉⣩⣿⡿⠶⠶⠒⠛⠛⠻⠿⠶⣾⣿⣣⠔⠉⠀⠀⠙⡆⢻⣷⠀⠀⠀⠀⠀\n");
  356. printf("⠀⠀⢸⣿⠀⠀⢠⣾⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⡃⠀⠀⠀⠀⠀⢻⠘⣿⡀⠀⠀⠀⠀\n");
  357. printf("⠀⠀⠘⣿⡀⣴⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠻⢶⣤⣀⠀⢘⠀⣿⡇⠀⠀⠀⠀\n");
  358. printf("⠀⠀⠀⢿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⢿⣴⣿⠀⠀⠀⠀⠀\n");
  359. printf("⠀⠀⠀⣸⡟⠀⠀⠀⣴⡆⠀⠀⠀⠀⠀⠀⠀⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣷⡀⠀⠀⠀⠀\n");
  360. printf("⠀⠀⠀⠀⢰⣿⠁⠀⠀⣰⠿⣇⠀⠀⠀⠀⠀⠀⢻⣷⡀⠀⢠⡄⠀⠀⠀⠀⠀⡀⠀⠹⣷⠀⠀⠀⠀\n");
  361. printf("⠀⠀⠀⠀⣾⡏⠀⢀⣴⣿⣤⢿⡄⠀⠀⠀⠀⠀⠀⠸⣿⣷⡀⠘⣧⠀⠀⠀⠀⠀⣷⣄⠀⢻⣇⠀⠀⠀\n");
  362. printf("⠀⠀⠀⠀⢻⣇⠀⢸⡇⠀⠀⠀⢻⣄⠀⠀⠀⠀⠀⣤⡯⠈⢻⣄⢻⡄⠀⠀⠀⠀⣿⡿⣷⡌⣿⡄⠀⠀\n");
  363. printf("⠀⢀⣸⣿⠀⢸⡷⣶⣶⡄⠀⠙⠛⠛⠛⠛⠛⠃⣠⣶⣄⠙⠿⣧⠀⠀⠀⢠⣿⢹⣻⡇⠸⣿⡄⠀\n");
  364. printf("⢰⣿⢟⣿⡴⠞⠀⠘⢿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⡇⠀⣿⡀⢀⣴⠿⣿⣦⣿⠃⠀⢹⣷⠀\n");
  365. printf("⠀⢿⣿⠁⠀⠀⠀⠀⠀⠀⠀⢠⣀⣀⡀⠀⡀⠀⠀⠀⠀⠀⠀⣿⠛⠛⠁⠀⣿⡟⠁⠀⠀⢀⣿⠂\n");
  366. printf("⠀⢠⣿⢷⣤⣀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠛⠉⠀⠀⠀⠀⠀⢠⡿⢰⡟⠻⠞⠛⣧⣠⣦⣀⣾⠏⠀\n");
  367. printf("⠀⢸⣿⠀⠈⢹⡿⠛⢶⡶⢶⣤⣤⣤⣤⣤⣤⣤⣤⣶⠶⣿⠛⠷⢾⣧⣠⡿⢿⡟⠋⠛⠋⠁⠀⠀\n");
  368. printf("⠀⣾⣧⣤⣶⣟⠁⠀⢸⣇⣸⠹⣧⣠⡾⠛⢷⣤⡾⣿⢰⡟⠀⠀⠀⣿⠋⠁⢈⣿⣄⠀⠀⠀⠀⠀\n");
  369. printf("⠀⠀⠀⣼⡏⠻⢿⣶⣤⣿⣿⠀⠈⢉⣿⠀⢸⣏⠀⣿⠈⣷⣤⣤⣶⡿⠶⠾⠋⣉⣿⣦⣀⠀⠀⠀\n");
  370. printf("⠀⠀⣼⡿⣇⠀⠀⠙⠻⢿⣿⠀⠀⢸⣇⠀⠀⣻⠀⣿⠀⣿⠟⠋⠁⠀⠀⢀⡾⠋⠉⠙⣿⡆⠀⠀\n");
  371. printf("⠀⠀⢻⣧⠙⢷⣤⣦⠀⢸⣿⡄⠀⠀⠉⠳⣾⠏⠀⢹⣾⡇⠀⠀⠙⠛⠶⣾⡁⠀⠀⠀⣼⡇⠀⠀\n");
  372. printf("⠀⠀⠀⠙⠛⠛⣻⡟⠀⣼⣿⣇⣀⣀⣀⡀⠀⠀⠀⣸⣿⣇⠀⠀⠀⠀⠀⠈⢛⣷⠶⠿⠋⠀⠀⠀\n");
  373. printf("⠀⠀⠀⠀⠀⢠⣿⣅⣠⣿⠛⠋⠉⠉⠛⠻⠛⠛⠛⠛⠋⠻⣧⡀⣀⣠⢴⠾⠉⣿⣆⠀⠀⠀⠀⠀\n");
  374. printf("⠀⠀⠀⠀⠀⣼⡏⠉⣿⡟⠁⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣌⠁⠀⠀⠈⣿⡆⠀⠀⠀⠀\n");
  375. printf("⠀⠀⠀⠀⠀⣿⣇⣠⣿⣿⡶⠶⠶⣶⣿⣷⡶⣶⣶⣶⣶⡶⠶⠶⢿⣿⡗⣀⣤⣾⠟⠁⠀⠀⠀⠀\n");
  376. printf("⠀⠀⠀⠀⠀⠈⠙⠛⢻⣿⡇⠀⠀⣿⡟⠛⠷⠶⠾⢿⣧⠁⠀⠀⣸⡿⠿⠟⠉⠀⠀⠀⠀⠀⠀⠀\n");
  377. printf("⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣷⣦⣤⡿⠀⠀⠀⠀⠀⠀⢿⣧⣤⣼⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n");
  378.  
  379. printf("enter q to go back to menu\n");
  380. scanf(" %c", &q);
  381. if(q=='q') {
  382. printf("\033[2J\033[H");
  383. goto menu;};
  384.  
  385. }
  386. if (i==11) {
  387. printf("\033[2J\033[H");
  388.  
  389.  
  390. printf("⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣶⡋⠉⠙⠒⢤⡀⠀⠀⠀⠀⠀⢠⠖⠉⠉⠙⠢⡄⠀\n");
  391. printf("⠀⠀⠀⠀⠀⠀⢀⣼⣟⡒⠒⠀⠀⠀⠀⠀⠙⣆⠀⠀⠀⢠⠃⠀⠀⠀⠀⠀⠹⡄\n");
  392. printf("⠀⠀⠀⠀⠀⠀⣼⠷⠖⠀⠀⠀⠀⠀⠀⠀⠀⠘⡆⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⢷\n");
  393. printf("⠀⠀⠀⠀⠀⠀⣷⡒⠀⠀⢐⣒⣒⡒⠀⣐⣒⣒⣧⠀ ⢰⠀⠀⢠⢤⢠⡠ ⠀⢸⠀\n");
  394. printf("⠀⠀⠀⠀⠀⢰⣛⣟⣂⠀⠘⠤⠬⠃⠰⠑⠥⠊⣿ ⠀⢸⠀⠀⠓⠃⠋⠂ ⠀⢸⠀\n");
  395. printf("⠀⠀⠀⠀⠀⢸⣿⡿⠤⠀⢸⠁⠀⠀⢀⡆⠀⠀⣿⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⣸\n");
  396. printf("⠀⠀⠀⠀⠀⠈⠿⣯⡭⠀⠸⡀⠀⢀⣀⠀⠀⠀⡟⠀⠀⢸⠀⠀⠀⠀⠀⠀⢠⠏\n");
  397. printf("⠀⠀⠀⠀⠀⠀⠀⠈⢯⡥⠄⢱⠀⠀⠀⠀⠀⡼⠁⠀⠀⠀⠳⢄⣀⣀⣀⡴⠃⠀\n");
  398. printf("⠀⠀⠀⠀⠀⠀⠀⠀⠀⢱⡦⣄⣀⣀⣀⣠⠞⠁⠀⠀⠀⠀⠀⠀⠈⠉⠀⠀⠀⠀\n");
  399. printf("⠀⠀⠀⠀⠀⠀⠀⢀⣤⣾⠛⠃⠀⠀⠀⢹⠳⡶⣤⡤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀\n");
  400. printf("⠀⠀⠀⠀⣠⢴⣿⣿⣿⡟⡷⢄⣀⣀⣀⡼⠳⡹⣿⣷⠞⣳⠀⠀⠀⠀⠀⠀⠀⠀\n");
  401. printf("⠀⠀⠀⢰⡯⠭⠹⡟⠿⠧⠷⣄⣀⣟⠛⣦⠔⠋⠛⠛⠋⠙⡆⠀⠀⠀⠀⠀⠀⠀\n");
  402. printf("⠀⠀⢸⣿⠭⠉⠀⢠⣤⠀⠀⠀⠘⡷⣵⢻⠀⠀⠀⠀⣼⠀⣇⠀⠀⠀⠀⠀⠀⠀\n");
  403. printf("⠀⠀⡇⣿⠍⠁⠀⢸⣗⠂⠀⠀⠀⣧⣿⣼⠀⠀⠀⠀⣯⠀⢸⠀⠀⠀⠀⠀⠀⠀\n");
  404. printf("(not doing this cuz I'm lazy ok?)\n");
  405. printf("enter q to go back to menu\n");
  406. scanf(" %c", &q);
  407. if(q=='q') {
  408. printf("\033[2J\033[H");
  409. goto menu;};
  410. }
  411. if(i==12)
  412. { printf("\033[2J\033[H");
  413. cubic();
  414. }
  415.  
  416.  
  417. return 0;
  418. }
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429. void cubic()
  430. {
  431. double a,b,c,d,x,y,z,r,pq,sumpq,subpq;
  432. double p,q;
  433. printf("if ax^3 + bx^2 + cx + d, \n provide a b c d \n ");
  434. scanf("%lf %lf %lf %lf",&a , &b, &c, &d);
  435.  
  436. printf("provide 1 real root");
  437. scanf("%lf",&r);
  438. sumpq=-(b/a)-r;
  439. pq=-(d/a)/r;
  440. subpq=(((sumpq)*(sumpq))-4*pq);
  441. p=((sumpq)+ sqrt(subpq ))/2;
  442. q=((sumpq)- sqrt(subpq ))/2;
  443. if ("p=nan")
  444. {
  445. printf("2nd root=imaginary\n");
  446.  
  447.  
  448. }
  449. else {
  450. printf("lf%",p);
  451. }
  452. if ("q=nan")
  453. {
  454. printf("3rd root=imaginary");
  455.  
  456.  
  457. }
  458. else {
  459. printf("lf%",q);
  460.  
  461. }
  462. }
  463.  
  464.  
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .
[..........]0% 
𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .
[###.......]30%
𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .
[#####.....]50%
𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .
[########..]80%
𝐍𝐨𝐰 𝐥𝐨𝐚𝐝𝐢𝐧𝐠. . .
[##########]100% 
welcome to idk what calculator(v6+)


                         |\_/|        
                         | @ @ <--kutta!
                         |   <>       
                         |  _/\----. 
                         |               
                         |               
************************************
designed by saif at 4am 
#don't enter anything besides numbers.
#can calculate negative numbers.
#should be able to calculate near infinity.
#decimals upto 4
*bug bhalluk: u tell me.

************************************
navigate by entering numbers
[0]exit
[1]jug numbers(+)(max 10 numbers)
[2]bhag numbers(/)(inf means infinity)
[3]goon numbers(x)
[4]biyog numbers(-)
[5]area of a circle(m^2)
[6]quadratic solver(nan means imaginary)
[12]cubic function root with 1 real root given[7]interest calcuator(normal. not compound)
[8]very much hidden menu(very hard password)
[9]sum of 1 to n th number(idk what's the term for it)
[10] random ASCII art 
[11] ok. 
[100] given up projects
Your wish?-