Skip to content

Instantly share code, notes, and snippets.

View siddharthaborah's full-sized avatar
👽

Siddhartha Borah siddharthaborah

👽
View GitHub Profile
@siddharthaborah
siddharthaborah / fizzBuzzGame.py
Created February 16, 2024 15:38
FizzBuzz game
"""
You are going to write a program that automatically
prints the solution to the FizzBuzz game.
These are the rules of the FizzBuzz game:
--> Your program should print each number from 1 to 100 in turn and include number 100.
--> When the number is divisible by 3 then instead of printing the number it should print "Fizz".
@siddharthaborah
siddharthaborah / findWhitespaceInAString.c
Created January 18, 2024 16:04
write a program to find the number of white spaces from a string without using library function
#include <stdio.h>
int countchar(char str[]);
int main(){
int i, lenOfStr, countWhiteSpace;
char str[50];
printf("Enter the string: ");
gets(str);
lenOfStr = countchar(str);
@siddharthaborah
siddharthaborah / sumOfElementOfArrayUsingFunciton.c
Last active February 16, 2024 15:41
Sum of elements of array using function
#include <stdio.h>
int sumOfArray(int arr[], int n);
int main(){
int arr[10],i, n, sumOf;
printf("Enter the number of element: ");
scanf("%d",&n);
printf("Enter the elements of array: ");
for(i=0; i< n; i++){