Skip to content

Instantly share code, notes, and snippets.

saiedabbas93

Block or report user

Report or block saiedabbas93

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Pascal_traingle.c
#include <stdio.h>
#include<conio.h>
#include<math.h>
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--)
@saiedabbas93
saiedabbas93 / octal.c
Created Aug 29, 2019
Decimal to octal number
View octal.c
#include<stdio.h>
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++)
@saiedabbas93
saiedabbas93 / OUTPUT
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=
View output
#include<stdio.h>
#include<conio.h>
void main()
{
int year;
printf("Enter the year\n");
scanf("%d",&year);
if(year%4==0)
{
@saiedabbas93
saiedabbas93 / odd_even.c
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<stdio.h>
#include<conio.h>
void main()
{
int num,result;
printf("Enter the number\n");
scanf("%d",&num);
result=num%2;
if (result==0)
@saiedabbas93
saiedabbas93 / Costprice_if_else.c
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<stdio.h>
#include<conio.h>
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);
@saiedabbas93
saiedabbas93 / STONE_PAPER_SCISSORS_WITH_COMPUTER.c
Created Aug 13, 2019
STONE PAPER SCISSORS WITH THE COMPUTER
View STONE_PAPER_SCISSORS_WITH_COMPUTER.c
#include<stdio.h>
#include<conio.h>
#include<time.h>
#include<stdlib.h>
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);
@saiedabbas93
saiedabbas93 / STONE_PAPER_SCISSORS.c
Last active Aug 13, 2019
STONE/ROCK PAPER SCISSORS GAME BETWEEN TWO PLAYERS IN C PROGRAM
View STONE_PAPER_SCISSORS.c
#include<stdio.h>
#include<conio.h>
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.