Posts

Showing posts from July, 2019

[Let Us C solution ] C Program To Convert Temperature

Image
Code : - #include<stdio.h> #include<windows.h> #include<conio.h> void main(){ float cel,fr; system("cls"); printf("\n\n\t\tCONVERSION IN TEMPRETURE"); printf("\n\n\n\t\tENTER VALUE IN FAHRENHEIT  : "); scanf("%f",&fr); cel=(5*fr-160)/9; printf("\n\n\t\tVALUE IN CELCIUS : %f",cel); getch(); } Download Files

[Let us C Solution ] C Program TO Find Any Trigonametric value

Image
Code:- #include<stdio.h> #include<conio.h> #include<windows.h> #include<math.h> void main(){ float a; int ch; do{ system("cls"); printf("\n\n\t\t\tTRIGINAMETRICAL MATH"); printf("\n\n\t\tENTER ANGLE : "); scanf("%f",&a); printf("\n\n\t\t\t\tMENU\n\n"); printf("\n\n\t\t1.SIN"); printf("\n\n\t\t2.COS"); printf("\n\n\t\t3.TAN"); printf("\n\n\t\t4.COSEC"); printf("\n\n\t\t5.SEC"); printf("\n\n\t\t6.COT"); printf("\n\n\t\t7.EXIT"); printf("\n\n\t\tENTER YOUR CHOICE AS 1,2,3,4,5,6 ..."); scanf("%d",&ch); switch(ch){ case 1: printf("\n\n\t\tSINE  VALUE : %f",sin(a)); getch(); break; case 2: printf("\n\n\t\tCOS  VALUE : %f",cos(a)); getch(); break; case 3: printf("...

[Let Us C Solutions ] C Program For Swapping two given Numbers

Image
Code : - #include<stdio.h> #include<windows.h> #include<conio.h> void main(){ int C,D,temp; system("cls"); printf("\n\n\t\tSWAPPING DEMO "); printf("\n\n\t\tFirst Type Of Swapping Is Shown below :--"); printf("\n\n\t\tSWAPPING DEMO USING 3RD VARIABLE"); printf("\n\n\t\tEnter Value Of C : "); scanf("%d",&C); printf("\n\n\t\tEnter Value Of D : "); scanf("%d",&D); temp=C; C=D; D=temp; printf("\n\n\t\tValue Of C : %d ",C); printf("\n\n\t\tValue Of D : %d ",D); printf("\n\n\t\tSecond Type Of Swapping Is Shown below :--"); printf("\n\n\t\tSWAPPING DEMO USING AIRTHMATIC OPREATIONS"); printf("\n\n\t\tEnter Value Of C : "); scanf("%d",&C); printf("\n\n\t\tEnter Value Of D : "); scanf("%d",&...

[Let Us C Solutions ] C Program To Find The Sum Of Five Digit Number

Image
Code :- #include<stdio.h> #include<conio.h> #include<windows.h> void main(){ int nu,rem,sum=0,cnu; system("cls"); printf("\n\n\t\tSUM OF FIVE DIGIT"); printf("\n\n\t\tENTER 5 DIGIT NUMBER  : "); scanf("%d",&nu); cnu=nu; rem=nu%10; sum=sum+rem; nu=nu/10; rem=nu%10; sum=sum+rem; nu=nu/10; rem=nu%10; sum=sum+rem; nu=nu/10; rem=nu%10; sum=sum+rem; nu=nu/10; rem=nu%10; sum=sum+rem; nu=nu/10; printf("\n\n\t\tSUM OF %d NUMBER  : %d",cnu,sum); getch(); } Download Files

[Let Us C Solution ] C Program TO Find Average Of Given Subjects Marks

Image
Code: - #include<stdio.h> /*program uing goto ,if,logic opreater */ #include<windows.h> #include<conio.h> void main(){ float total,avg,mark1,mark2,mark3,mark4,mark5; system("cls"); printf("\n\n\t\t  FIND AGGRETE AND AVG MARKS OF STUDENT \n\n"); printf("\n\n\tPLEASE ENTER MARKS IN GIVEN SUBJECTS ---- "); m: printf("\n\n\t\t\tMATH     : "); scanf("%f",&mark1); if(mark1<0||mark1>100){ printf("\n\n\t\tMARKS SHOULD BE IN 0-100"); goto m; } p: printf("\n\n\t\t\tPHYSICS  : "); scanf("%f",&mark2); if(mark2<0||mark2>100){ printf("\n\n\t\tMARKS SHOULD BE IN 0-100"); goto p; } c: printf("\n\n\t\t\tCHEMISTRY: "); scanf("%f",&mark3); if(mark3<0||mark3>100){ printf("\n\n\t\tMARKS SHOULD BE IN 0-100"); goto c; } e: printf("\n\n\t\t\tENGLISH...

How To Use Your Android Or PC As A Web Server

Image
Hello friends , today i am gona to teach you how use your Android phone or your pc  ,as a web server using localhost or the ngrok tool in Termux Localhost Penguin Server :- The localhost is the default name describing the local computer address also known as the loopback address. For example, typing: ping localhost would ping the local IP address of 127.0.0.1 (the loopback address). When setting up a web server or software on a web server, 127.0.0.1 is used to point the software to the local machine. Download LocalHost Server App Penguin For Android What Is Termux :- Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager. Download Termux What is Ngrok? Ngrok is a multiplatform tunnelling, reverse proxy software that establishes secure...

[Let us C Solution ] C Program To FInd Area and Perimeter Of Rectangle And Circle

Image
#include<stdio.h> #include<windows.h> #include<conio.h> void main(){ float length,width,radius,area,perimeter,cir; system("cls"); printf("\n\n\t\tFINDING AREA AND PERIMETER OF  RECTANGLE"); printf("\n\n\t\tENTER LENGTH OF RECTANGLES : "); scanf("%f",&length); printf("\n\n\t\tENTER BREDTH OF RECTANGLES : "); scanf("%f",&width); area=length*width; perimeter=2*(length+width); printf("\n\n\t\tAREA OF RECTANGLE :  %f",area); printf("\n\n\t\tPERIMETER OF RECTANGLE :  %f",perimeter); Sleep(1000); printf("\n\n\t\tDO YOU WANA TO CONTINUE ......"); printf("\n\n\t\tPRESS ANY KEY TO CONTINUE..."); getch(); system("cls"); printf("\n\n\t\tENTER RADIUS OF CIRCLE : "); scanf("%f",&radius); cir=4*22/7*radius; area=22/7*radius*radius; printf("\n\n\t\tCIRCUMF...

[Let us C Solution ]C Program to find the average of n (n < 10) numbers using arrays

// Program to find the average of n (n < 10) numbers using arrays #include <stdio.h> int main () { int marks [ 10 ], i , n , sum = 0 , average ; printf ( "Enter n: " ); scanf ( "%d" , & n ); for ( i = 0 ; i < n ; ++ i ) { printf ( "Enter number%d: " , i + 1 ); scanf ( "%d" , & marks [ i ]); sum += marks [ i ]; } average = sum / n ; printf ( "Average = %d" , average ); return 0 ; } Output Enter n: 5 Enter number1: 45 Enter number2: 35 Enter number3: 38 Enter number4: 31 Enter number5: 49 Average = 39

[Let us C Solution ] C Program To Writing And Reading To A Text File

Example 1: Write to a text file using fprintf() #include <stdio.h> #include <stdlib.h> int main () { int num ; FILE * fptr ; fptr = fopen ( "C:\\program.txt" , "w" ); if ( fptr == NULL ) { printf ( "Error!" ); exit ( 1 ); } printf ( "Enter num: " ); scanf ( "%d" ,& num ); fprintf ( fptr , "%d" , num ); fclose ( fptr ); return 0 ; } Example 2:Read to a text file using  scanf() #include <stdio.h> #include <stdlib.h> int main () { int num ; FILE * fptr ; if (( fptr = fopen ( "C:\\program.txt" , "r" )) == NULL ){ printf ( "Error! opening file" ); // Program exits if the file pointer returns NULL. exit ( 1 ); } fscanf ( fptr , "%d" , & num ); printf ( "Value of n=%d" , n...