Skip to content

Instantly share code, notes, and snippets.

View mukonzi's full-sized avatar

Stewart Mukonzi mukonzi

View GitHub Profile
/*
* Written by Stewart Mukonzi
* date: 21/04/20
* authors's website: http://stewartmukonzi.blogspot.com
*/
#include<stdio.h>
int main()
@mukonzi
mukonzi / stringpalindromes.c
Created November 8, 2019 08:58
Description: A C Program to check if a string is a palindrome
/******************************************************************************
Author: Stewart Mukonzi
Written: 11/08/19
Description: A C Program to check if a string is a palindrome
*******************************************************************************/
#include <stdio.h>
#include <string.h>
@mukonzi
mukonzi / lotto.c
Created November 7, 2019 17:28
C Program to generate six random numbers.
/******************************************************************************
Author: Stewart Mukonzi
Written: 07/11/19
Description: C Program to generate six random numbers.
*******************************************************************************/
#include <stdio.h>
int rand();
int i=0;
@mukonzi
mukonzi / primenum.c
Created November 7, 2019 06:23
A C program to check if a number is prime
/******************************************************************************
Author: Stewart Mukonzi
Written: 07/11/19
Description: A C program to check if a number is prime
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
@mukonzi
mukonzi / charcount.c
Last active November 15, 2019 04:07
A simple program to count vowels and consonants in a file
/******************************************************************************
Author: Stewart Mukonzi
Written: 06/11/19
Description: A simple program to count vowels and consonants in a file.
It needs to be refined take into consideration capital letters, null spaces
and other characters.
*******************************************************************************/
@mukonzi
mukonzi / h2oBill.c
Created November 6, 2019 06:27
C Program to calculate water bill
/******************************************************************************
Author : Stewart Mukonzi
Written : 06/11/19
Description: C Program to calculate water bill
*******************************************************************************/
#include <stdio.h>
#define min_pay 5.00
@mukonzi
mukonzi / codeprac.c
Created November 2, 2019 05:00
c program showing how continue and break affect a loop
/******************************************************************************
Author: Stewart Mukonzi
Written: 02/11/19
Descrpition: C program to show how continue and break statements can be used
*******************************************************************************/
#include <stdio.h>
#define PI 3.14
int x=7;
@mukonzi
mukonzi / fman.c
Created October 23, 2019 05:47
c program to show file manipulation
/*
* Author: Stewart Mukonzi
* Written : 23/10/19
* Description: C program to show file manipulation
*/
#include <stdio.h>
#include <stdlib.h>
@mukonzi
mukonzi / Eb.c
Created October 18, 2019 07:39
C Program to show Egyptian Binary
/*
Author: Stewart Mukonzi
Written: 18/10/19
Description: A C Program to show the Egpyptian Binary
*/
#include <stdio.h>
long a,b, sum=0;