Instantly share code, notes, and snippets.

# saiedabbas93

• Sort options
Created Sep 11, 2019
View Pascal_traingle.c
 #include #include #include void main() { int i,j,k,power,a,d1,b,d2,c,d3,d,d4,e,d5; for(i=0;i<=4;i++) { for(j=8;j>i;j--)
Created Aug 29, 2019
Decimal to octal number
View octal.c
 #include void main() { int num,i,d1,r1,d2,r2,d3,r3,d4,r4,d5,r5,d6,r6,d7,r7,d8,r8,d9,r9,octal; printf("Enter the num "); scanf("%d",&num); printf("DECIMAL\tOCTAL\n"); for(i=0;i<=num;i++)
Last active Aug 17, 2019
If you input the date, the code will tell what day it will be.
View OUTPUT
 day= 16 Type the following codes for the required month March-1 April-2 May-3 June-4 July-5 AUgust-6 September-7 October-8 November-9 December-10 January-11 Febraury-12 6 Last 2 digits of year= 19 first 2 digits of year=
Created Aug 15, 2019
Leap_year.c
View output
 #include #include void main() { int year; printf("Enter the year\n"); scanf("%d",&year); if(year%4==0) {
Created Aug 15, 2019
Any integer is input through the keyboard. Write a program to find out whether it is an odd number or even number.
View odd_even.c
 #include #include void main() { int num,result; printf("Enter the number\n"); scanf("%d",&num); result=num%2; if (result==0)
Last active Aug 15, 2019
If cost price and selling price of an item is input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred.
View Costprice_if_else.c
 #include #include void main() { int cp,sp,tl,tp; printf("Enter the Cost price\n"); scanf("%d",&cp); printf("Enter the Selling price\n"); scanf("%d",&sp);
Created Aug 13, 2019
STONE PAPER SCISSORS WITH THE COMPUTER
View STONE_PAPER_SCISSORS_WITH_COMPUTER.c
 #include #include #include #include void main() { char player1[10]; int in1,in2; printf("HELLO, WELCOME TO ROCK, PAPER, SCISSORS GAME\nWhat is player1's name?\n "); scanf("%s",&player1);
Last active Aug 13, 2019
STONE/ROCK PAPER SCISSORS GAME BETWEEN TWO PLAYERS IN C PROGRAM
View STONE_PAPER_SCISSORS.c
 #include #include void main() { char player1[10],player2[10]; int in1,in2; printf("HELLO, WELCOME TO ROCK, PAPER, SCISSORS GAME\nWhat is player1's name?\n "); scanf("%s",&player1); printf("What is player2's name?\n "); scanf("%s",&player2);
You can’t perform that action at this time.