#include <stdio.h> int main() { double num1, num2, num3; printf("Enter first number: "); scanf("%lf", &num1); printf("Enter second number: "); scanf("%lf",...
Continue reading...C PROGRAMS
Program in C to find largest number using if statement Copy Copy
#include <stdio.h> int main() { double num1, num2, num3; printf("Enter first number: "); scanf("%lf", &num1); printf("Enter second number: "); scanf("%lf",...
Continue reading...Program in C to find largest number using if statement Copy
#include <stdio.h> int main() { double num1, num2, num3; printf("Enter first number: "); scanf("%lf", &num1); printf("Enter second number: "); scanf("%lf",...
Continue reading...Program in C to add two numbers Copy Copy
#include <stdio.h> void main() { int num1, num2, sum; printf("Enter two integers: "); scanf("%d %d", &num1, &num2); // calculating sum...
Continue reading...Program in C to convert uppercase string to lowercase string
#include<stdio.h> #include<string.h> int main(){ char str[25]; int i; printf("Enter the string: "); scanf("%s",str); for(i=0;i<=strlen(str);i++){ if(str[i]>=65&&str[i]<=90) str[i]=str[i]+32; } printf("nLower Case String...
Continue reading...Program in C to Reverse a String using recursion
#include <stdio.h> #include <string.h> void reverse_string(char*, int, int); int main() { char char string_array[150]; printf("Enter any string:"); scanf("%s", &string_array); reverse_string(string_array,...
Continue reading...Program in C to convert lowercase string to uppercase string
#include <stdio.h> int main() { int number, i; printf("Enter an integer: "); scanf("%d", &number); printf("Multiplication table of %d: n", number);...
Continue reading...Program in C to Generate Multiplication Table
#include <stdio.h> int main() { int number, i; printf("Enter an integer: "); scanf("%d", &number); printf("Multiplication table of %d: n", number);...
Continue reading...Program in C to Find ASCII value of a Character
#include <stdio.h> int main() { char ch; printf("Enter any character:"); printf("ASCII value of character %c is: %d", ch, ch); return...
Continue reading...C Program to check Leap Year
#include <stdio.h> int main() { int y; printf("Enter year: "); scanf("%d",&y); if(y % 4 == 0) { if( y %...
Continue reading...