Skip to content

AsadullahAlMunib/Interesting_Functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Interesting_Functions

The header files used in this code are:

#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>

Important

The conio.h header file is one of the header files used in this Interesting_Functions.c code.

If you want to use it, make sure your compiler supports the conio.h header file.

Tip

If you don't have a compiler that supports conio.h, you can use the Interesting_Functions_2.c code.

  • All systems used by the conio.h header file are commented out here, so this code won't clear the screen at different times with function changes!

There are 11 types of functions in this code:

And I will try to UPDATE and IMPROVE it, Insha'Allah.


1. Pyramid.

You will get 6 types of Pyramid:

1. Full Pyramid.

2. Half Left Pyramid.

3. Half Right Pyramid.

4. Interval Full Pyramid.

5. Interval Half Left Pyramid.

6. Interval Half Right Pyramid.

Every Pyramid you can get by 3 type of character:

  • 1. By * (star)

  • 2. By Number

  • 3. By Letter


2. Prime Number.

You will get 3 systems of Prime Numbers:

1. Check Prime Number.

2. Prime Number from Start (1).

3. Prime Number between Two Intervals.

  • A whole number greater than 1 that cannot be made by multiplying other whole numbers, that is called a prime number.

3. String Length.

When you enter a message/string, it will calculate and show the length of the string.

  • A string is a sequence of characters and can contain letters, numbers, symbols and even spaces.

4. Captcha by Math.

You will get two random numbers between 1 and 50. And it will provide you with Plus or Minus or Multiply.


5. Numbers Type Show.

You can provide many numbers separated by space, and it will show you the number of Positive, Negative, Zero, Even and Odd.


6. Password Generator.

Enter the length of the password you want. Then it will provide you with a randomly Generated Password.


7. Message Repetition.

Enter your Message, and provide the number of times you want it to repeat, then you will receive the Message with the Repeated Number.


8. Narcissistic Number.

You will get 3 systems of Narcissistic Numbers:

1. Check Narcissistic Number.

2. Narcissistic Number from Start (1).

3. Narcissistic Number between Two ranges.

  • If a number that is the sum of its own digits each raised to the power of the number of digits, that is a Narcissistic Number.

    • For Example:

    • 371 = 33 + 73 + 13

    • 9474 = 94 + 44 + 74 + 44


9. Number Guessing Game.

The Number Guessing Game has 3 difficulties:

1. Easy: Range 1 to 50 and 10 Attempt.

2. Medium: Range 1 to 100 and 8 Attempt.

3. Hard: Range 1 to 200 and 6 Attempt.

  • The system selects a random number within the difficulty range, and you have a difficulty-based chance of trying to guess that number. When you are able to find that number, you get an attempt-based score. The maximum score is 100 on the 1st attempt. If you can't guess the number even though your attempts are over, you will see that random number with a sound.

10. Mine Guessing Puzzle Game.

The Mine Guessing Puzzle Game has 3 difficulties:

1. Easy: 5 Matrix & 5 Mine (Max).

2. Medium: 7 Matrix & 12 Mine (Max).

3. Hard: 9 Matrix & 25 Mine (Max).

  • The system will distribute difficulty wise Square of Dot. The dots have an under-organized random number and a difficulty-wise mine by star. You have to enter two numbers separated by space. The first number represents the line-number of up-and-down rows, and the second number represents the dot-number of left-and-right columns. When you enter those two numbers, the hidden character of that particular dot will be displayed. If that particular dot has a star, the game will be over with a sound. After the game is over, you will get your score, which is 1 for every number. Then you can see the all random number selection of every dot.

11. Uppercase Lowercase Converter.

You have 2 options to convert the letters case:

1. Every Letter Lowercase.

2. Every Letter Uppercase.

  • Enter your text and complete it by using a dot, otherwise the system will never stop getting input and never convert.

About

I have created some Interesting Functions, and will keep trying to UPDATE and IMPROVE it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages