This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main() | |
| { | |
| int i,n,p[10]={1,2,3,4,5,6,7,8,9,10},min,k=1,btime=0; | |
| int bt[10],temp,j,at[10],wt[10],tt[10],ta=0,sum=0; | |
| float wavg=0,tavg=0,tsum=0,wsum=0; | |
| printf(" -------Shortest Job First Scheduling ( NP )-------\n"); | |
| printf("\nEnter the No. of processes :"); | |
| scanf("%d",&n); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| USAGE | |
| 1. Open the playlist you want | |
| //Make sure to add a &disable_polymer=true in the URL | |
| 2. Right click > Inspect element > Console | |
| 3. Copy this and paste. Hit enter. | |
| 4. For watch later make sure to click the Edit button | |
| EDIT: Not all playlists have hours. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <math.h> | |
| int main() | |
| { | |
| float radius, height; | |
| float surface_area, volume; | |
| printf("Enter value for radius and height of a cylinder : \n"); | |
| scanf("%f%f", &radius, &height); | |
| surface_area = 2 * (22 / 7) * radius * (radius + height); | |
| volume = (22 / 7) * radius * radius * height; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| void main() | |
| { | |
| int sec; | |
| float distance , initial_velocity,velocity, acceleration; | |
| printf("Enter the time in seconds \n"); | |
| scanf("%d",&sec); | |
| printf("Enter the initial velocity \n"); | |
| scanf("%f", &initial_velocity); | |
| printf("Enter the acceleration \n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python3 program to add two numbers | |
| number1 = input("First number: ") | |
| number2 = input("\nSecond number: ") | |
| # Adding two numbers | |
| # User might also enter float numbers | |
| sum = float(number1) + float(number2) | |
| # Display the sum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python3 program to add two numbers | |
| number1 = input("First number: ") | |
| number2 = input("\nSecond number: ") | |
| # Adding two numbers | |
| # User might also enter float numbers | |
| sum = float(number1) + float(number2) | |
| # Display the sum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # factorial of given number | |
| def factorial(n): | |
| # single line to find factorial | |
| return 1 if (n==1 or n==0) else n * factorial(n - 1) | |
| # Driver Code | |
| num = 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python3 program to find simple interest | |
| # for given principal amount, time and | |
| # rate of interest. | |
| # We can change values here for | |
| # different inputs | |
| P = 1 | |
| R = 1 | |
| T = 1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python program to print all | |
| # prime number in an interval | |
| start = 11 | |
| end = 25 | |
| for val in range(start, end + 1): | |
| # If num is divisible by any number | |
| # between 2 and val, it is not prime |
OlderNewer