Number pattern using C language
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Number pattern using C language

  • 729 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
729
On Slideshare
729
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
14
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 11 21 2 31 2 3 41 2 3 4 51 2 3 4 5 61 2 3 4 5 6 71 2 3 4 5 6 7 8
  • 2.  HELLO FRIENDS ITS TIME TO UPLOAD SOMETHINGNEW IN OUR FAVOURITE AND WELL KNOWNLANGUAGE ‘C’ LANGUAGE……….. THE PATTERN SHOWN ON THE FIRST SLIDE IS THEMOST POPULAR METHOD IN THIS LANGUAGE. ITS ALSO KNOWN AS THE CHRISTMAS TREE ! ! ! ! ! AND HAD BEEN ASKED IN MANY INTERVIEWQUESTIONS FOR THE SELECTION PROCESS….. WE WILL TRY TO GO FOR THIS PROGRAM AND WILLEXECUTE THIS ONE >>>>>>>
  • 3. ||||||| NO PATTERN IS IMPOSSIBLE TOACHIEVE USING ‘C’ LANGUAGE |||||||||
  • 4. 11 21 2 31 2 3 41 2 3 4 51 2 3 4 5 61 2 3 4 5 6 71 2 3 4 5 6 7 8
  • 5.  TO ACHIEVE THIS ‘cHrIsTmAs tReE’, AS I HAVE ALWAYSSUGGESTED TO LEARN C LANGUAGE VERY MINUTELY…. THIS WILL HELP IN FAST PROGRAMMING ANDEFFECIENY ALSO INCREASES…… LOGICAL DEVELOPMENT IS ALSO VERY IMPORTANT INC LANGUAGE……….. WITHOUT IT WE CANNOT WRITE EVEN A SIMPLEPROGRAM……… SO TO LEARN EVERY THING WE HAVE TO LEARN THISTHINGS FIRST….! ! ! !
  • 6. C LANGUAGE IS MUST FOR THE‘SOFTWARE ENGINEERS’
  • 7.  NEVER EVER START WRITINGPROGAM DIRECTLY ONTHE COMPILER….. FIRSTLY PLAN ALL YOUR IDEAS ON A PIECE OF PAPERAND TRY TO REALISE THE DRAWBABCKS IN YOURPROGRAM..|||| TRY TO OPTIMIZE YOUR MEMORY …… THE LESS USEOF VARIABLES RESULT IN MORECOMPACT PROGRAMMING AND BETTER THAN OTHER. ONCE DONE WITH ALL THESE GO FOR THEPROGRAMWRITING ON THE COMPILER…….
  • 8.  TO CODE THIS PROGRAM WE JUST NEED TO HAVESOME AMOUNT OF IDEAS ABOUT1. DIFFERENT LOOPS2. ESCAPE SEQUENCES3. DECISION CONTROL INSTRUCTIONS4. VARIABLE DECLARATION TO STUDY ALL THESE THINGS YOU MUST REFERLET US ‘C’ BY Mr. YASHAVANT KANETKAR….. EXCELLENT BOOK WITH EASY LANGUAGE…… ESCAPE SEQUENCES ARE THEE ONE USED TOMAKE VARIATIONS IN THE LINE……
  • 9. PROGRAMTHE THING YOU ARE LOOKINGFOR!!!!!!!!
  • 10. #include<stdio.h>int main(){int i=0,q=0,x,y,num;while(i<8){for(x=0;x<=6-q;x++)printf(" ");for(y=0;y<=q;y++){if(y==0)num=1;elsenum=num*(y+1)/y;printf("%d ",num);}printf("n");i++;q++;}}
  • 11.  SINCE WE ARE REQUIRED TO PRINT THE SERIES UPTO 8NUMBERS, WE ARE RUNNING THE LOOP 0 TO 8TIMES…. THE LOGIC TO PRINT THE NUMBERS AFTER 1 WE HAV EWRITTEN IN THE PROGRAM ITSELF……. SO GUYS JUST READ THE INSTRUCTIONS VERYCAREFULLY AND THEN TRY TO EXECUTE THEPROGRAM…. AS I HAVE ALWAYS SAID PLEASE WRITE PROGRAMALWYS ON YOUR DON’T JUST COPY IT……
  • 12.  AND DO DOWNLOAD THIS PRESENTATION IT WILLHELP YOU IN LOT MANY WAYS ….||||| ANY QUERIES REGARDING THIS PROGRAM CONTACTME ON saurabh.khetan53@gmail.com A LOT CAN BE DONE THROUGH THIS LANGUAGE ANDIN A EASY MANNER…… LET ME KNOW IF YOU HAVE GOT ANY IDEA AND YOUARE NOT ABLE TO IMPLEMENT IT ! ! ! ! ! ! YOU AND ME WILL MAKE IT POSSIBLE ! ! ! !
  • 13. THANK YOU FOR WATCHING THISPRESENTATION ! ! ! !
  • 14. C’ LANGUAGE WAS DEVELOPED BY-DENNIS RITCHIE-1972