C Program: Enter a Number and Reverse It by Using goto Statement

Reverse Number
goto Statement:
  • goto statement is used to transfer control from one location to another location.
  • goto is a Keyword.
  • Keywords are the reserved words.
  • There are 32 keywords in C. 
Statement of C program: Enter a number and reversed it by using goto statement. 


#include<stdio.h>
#include<conio.h>

void main()
{                                                    /*  Start of main()  */
int a,c,d;
b=0;                                                // Assign value zero to 'b'
clrscr();
printf("Enter the value of a/n ");
scanf(" %d , &a");
d=a ;                                             // Assign value of 'a' to 'd'
BEGIN:  c=a%10                          // where BEGIN is a Lable                              
                                                    // % is a modulus operator. It is used for finding remainder value.
b=(b*10)+c;
a=a/10;                                               // It is also written as a/=10
if(a>0)
goto BEGIN;                                     // goto is a Keyword

printf(" Input Number=%d/n" , d);
printf(" Reversed Number=%d/n" , b)
                                                          /*  End of main()  */

Output:
Enter a number
1234
Input Number=1234
Reversed number=4321



2 Responses to "C Program: Enter a Number and Reverse It by Using goto Statement"

  1. Haloo pak^^

    Kami dari SENTANAPOKER ingin menawarkan pak^^

    Untuk saat ini kami menerima Deposit Melalui Pulsa ya pak.

    *untuk minimal deposit 10ribu
    *untuk minimal Withdraw 25ribu

    *untuk deposit pulsa kami menerima provider
    -XL
    -Telkomsel


    untuk bonus yang kami miliki kami memiliki
    *bonus cashback 0,5%
    *bunus refferal 20%
    *bonus gebiar bulanan (N-max,samsung Note 10+,Iphone xr 64G,camera go pro 7hero,Apple airpods 2 ,dan freechips)

    Daftar Langsung Di:

    SENTANAPOKER

    Kontak Kami;

    WA : +855 9647 76509
    Line : SentanaPoker
    Wechat : SentanaPokerLivechat Sentanapoker

    Proses deposit dan withdraw tercepat bisa anda rasakan jika bermain di Sentanapoker. So… ? tunggu apa lagi ? Mari bergabung dengan kami. Pelayanan CS yang ramah dan Proffesional dan pastinya sangat aman juga bisa anda dapatkan di Sentanapoker.

    ReplyDelete

Popular Posts

Label

1 Sidebar 2 Columns 3 Columns Footer 3rdball 4 Columns Footer Alex Alvaro Antsasia Arlinadesign Averie Barry BASIC CONCEPTS Basil Bayna Fast BeautyPress BeautyTemplates Beckel Best Best - Clean Beyonce Pro BioMag BlackMag Blanter Nova Blogger Card Bloggertheme9 Blogish Bpress Brakt C LANGUAGE C PROGRAMS C++ LANGUAGE C++ PROGRAMS Carella Cellar Charlotte Chooko Lite Clara Clean Combo One Cooperate Crusade Darry Dorman Dreamway Dunia Blanter eCars EduAcademy EducationPress Elise Elvan Eva Everyday FabNews Fashion Fashion Blogger Template Fashion Gossip FastCars Fedo FlashNews Fredy Portfolio Gaming Globus GoodTime Goomsite HTML LANGUAGE iGaming Indicate Innove Insomnia InspiredNews iSoft Jasmine Kalem Landscaping Lashira Lavelle Lily Fashion Limax Linea Lionex Luminescence Lite Lumix Luxury Magazine MagazinePro MAJOR DIFFERENCES MarketingBlog Martin MaxiMag Medica Mega Melissa Mercury MeshMag Minimag Minimalist MiniNews MovieKhor msdesignbd MusicLand Neko NetZine New Spread News16 Newsflash NewsForce NewsIdea Newspaper News NewsPro Nubie Fast Odd Themes Optima PaperMag PaperMag blog Parhlo Perfection Personal Personal Blog Photosout PixelZ Power Blog Premium Themes ProfileMag Purez Rano ReadNews Real estate Remito Grid Responsive Revo Robusta Rotario Saara SeoBoost Settle Shouters Simple Catch SimpleClean Sketchly SNews SolidMag Someo Sophie Sora Sora Bank Sora Home Sora News Responsive Sora One Sora Ribbon Spido Sticko Stucco Sure Mag Swift Tech Tech Pro Techia Techmax TechSpot TemplateClue Templateism Templatesilk Templatesyard Templatezy The Freelancer TheBlogger TheFocus Themeforest Themexpose TIPS AND TRICKS Topside TravelMag Trendy Trendy Travel Tumblr Under Construction Uong Jowo Veethemes Vertox VideoPlay Vigo Waverly way2themes WebBiz Wedding X-Mag Zealer ZetaMag