Some important programs in c using functions and the programs were commented below:

Disclaimer:

This is for my personal use don’t take this code seriously if you can take any help from this code then take otherwise don’t complain with any problem that occurs due to this blog…

This is here only to save my code for long because I don’t have the knowledge of git and github till now..

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define ARR_N 10

//
//void LowerThanDigit()
//{
// unsigned long long int num;
// int digit, counter=0, totalSum=0;
// printf(“Enter any numbers: “);
// scanf(“%lld”, &num);
// printf(“Enter any digit: “);
// scanf(“%d”, &digit);
//
// if(num < 0){
// num = num * (-1);
// }
//// Digits → { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
//
// while(num < 10)
// {
// if(num % 10 < digit)
// {
// counter++;
// totalSum += num % 10;
// }
// num = num / 10;
// }
// printf(“\n\n\n”);
// printf(“Total Amount of digits in %lld is %d\n”, num, counter);
// if(totalSum > 0){
// printf(“\n\n\nAverage of num is: %.2f”, (float) totalSum / counter);
// }
// else{
// printf(“\n\nAverage can’t be calculated’”);
// }
//
//}

// There comes something error that is not seen in compiler debuger
// but why the getchar() or scanf both functions can’t get
// character value in the next function in case of upper_to_lower
// and toUpper() functions. Solve this problem by watching video in youtube
// or getting help from google or anyway possible

//
//void average_grade(float grade1, float grade2, float grade3)
//{
// printf(“1. Calculating the average grade of three grade entered by the user\n\n”);
// printf(“Enter first grade: “);
// scanf(“%f”, &grade1);
// printf(“Enter second grade: “);
// scanf(“%f”, &grade2);
// printf(“Enter third grade: “);
// scanf(“%f”, &grade3);
//
// float average_grade;
// average_grade = (grade1 + grade2 + grade3) / 3;
// printf(“average grade is: %.2f\n”, average_grade);
//
//}
//
//void area_of_rectangle()
//{
// printf(“\n\n2. Calculating the area of rectangle: \n\n”);
// float area;
// float height, width;
// printf(“Enter the height of rectangle: “);
// scanf(“%f”, &height);
// printf(“Enter the width of rectangled: “);
// scanf(“%f”, &width);
//
// area = height * width;
// printf(“Area of rectangle: %.2f”, area);
//
//}
//
//void max2()
//{
// printf(“\n\n3. Calculating maximum number among two digit number: \n\n”);
// int num1, num2;
// if(num1 < 100 && num1 > (-100) && num2 < 100 && num2 > (-100)){
// if(num1 > num2){
// printf(“Maximum number is: %d”, num1);
// }
// else{
// printf(“Maximum number is: %d”, num2);
// }
// }
// else{
// printf(“Invalid input or it is not 2 digit number”);
// }
//}
//
//void factorial()
//{
// printf(“\n\n4. calculating factorial: \n\n”);
// unsigned long long int num, factorial = 1;
// printf(“Enter any number: “);
// scanf(“%lld”, &num);
//
// for(num; num > 0; num — ){
// factorial = factorial * num;
// }
// printf(“factorial: %lld\n”, factorial);
//}
//
//void isEven(){
// printf(“\n\n5. isEven() calculation…\n\n”);
// int num;
// bool even;
// printf(“Enter any number: “);
// scanf(“%d”, &num);
// if(num % 2 == 0){
// even = true;
// }
// else{
// even = false;
// }
// printf(“Even: %d”, even);
// if(even == true){
// printf(“given number is even…”);
// }
// else{
// printf(“Given number is odd….”);
// }
//}
//
//void seq9()
//{
// printf(“6. size_length calculation..\n\n”);
// int i, length;
// printf(“Enter the length of sequence: “);
// scanf(“%d”, &length);
// unsigned long long int num = 0;
// for(i=0; i<length; i++){
// num = num * 10 + 9;
// printf(“%lld\n”, num);
// }
//
//
//}
//
//void advance_sequence()
//{
// int i, length;
// printf(“Enter the length of sequence: “);
// scanf(“%d”, &length);
// unsigned long long int num = 0;
// if(length <= 9){
// for(i=0; i<length; i++){
// printf(“%d “, i+1);
// }
// }
// else if(length > 9){
// for(i=0; i<length; i++){
// num = num * 10 + 9;
// printf(“%lld\n”, num);
// }
// }
//
//}
//
//void capital_to_lower()
//{
// printf(“\n\n”);
// printf(“Enter any uppercase character(A-Z): “);
// char letter = getchar();
// if(letter >= ‘A’ && letter < ‘Z’){
// letter = letter — ‘A’ + ‘a’;
// printf(“\nThe lowercase letter is %c”, letter);
// }
//
//
//}
//
//void toUpper()
//{
// printf(“Enter any lowercase lettter(a-z): “);
// char toCapital = getchar();
//
// if(toCapital >= ‘a’ && toCapital <= ‘z’){
// toCapital = toCapital — ‘a’ + ‘A’;
// printf(“The uppercase letter is: %c\n\n”, toCapital);
// }
// else{
// printf(“error code: -1”);
// }
// printf(“\n\n”);
//}
//
//void char_to_digit()
//{
// char char1, char2, char3;
// int hundredth, tenth, unit;
// int finalresult;
// printf(“\n\n”);
// printf(“Enter any three character in the form of(‘char’ ‘char’ ‘char’): “);
// scanf(“‘%c’ ‘%c’ ‘%c’”, &char1, &char2, &char3);
// if(char1 >= ‘0’ && char1 <= ‘9’ && char2 >= ‘0’ && char2 <= ‘9’ && char3 >= ‘0’ && char3 <= ‘9’){
// hundredth = (char1 — ‘0’) * 100;
// tenth = (char2 — ‘0’) * 10;
// unit = char3 — ‘0’;
// finalresult = hundredth + tenth + unit;
// printf(“The decimal value of entered character is %d”, finalresult);
// }
// else{
// printf(“Error code 0”);
// }
//
//
//}
//
//void goodneighbour()
//{
// int array[ARR_N];
// int i;
// for(i=0; i<ARR_N; i++){
// printf(“Enter %d number: “, i+1);
// scanf(“%d”, &array[i]);
// }
// printf(“\n\n”);
// for(i=1; i<ARR_N-1; i++){
// if(array[i] == array[i-1] * array[i+1] ){
// printf(“In the index %d, the number %d has good neighbour\n”, i, array[i]);
// }
// if(array[i] != array[i-1] * array[i+1]){
// printf(“In the index %d, the number %d does not has good neighbour\n”, i, array[i]);
// }
// }
// printf(“\n\n”);
//
//}
//

int main()
{
LowerThanDigit();
// goodneighbour();
// char_to_digit();
// capital_to_lower();
// toUpper();
// float a, b, c;
// average_grade(a, b, c);
// area_of_rectangle();
// max2();
// factorial();
// isEven();
// seq9();
// advance_sequence();

return 0;
}

This is only to save my code for long lasted

Don’t feel angry with these code because it is save for my personal purpose but if it was gone in public then I need to aware you about this….

So don’t mess up…

Use medium.com by making account in it.

Signup today!!

thanks you very much

There is my blog named w3wikipedias.blogspot.com

link:

w3wikipedias

follow as this is very best blog….

thanks you very much see you again in other important topic

Hey internet family, it’s your friend.. I am a c programmer and Welcome to my blog where I provide you c programming codes for free of cost no ads will shown