adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Write a program in C to find odd numbers 1 to any number. Using continue statement.

Write a program in C to find odd numbers 1 to any number using continue statement.

#include<conio.h>
#include<stdio.h>
  void main() 
   {
    int i,n;
    printf("Enter a number:-");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
     {
        if(i%2==0)
         continue;
        printf("%2d",i);
     }
   getch();
  }
Output:-

Write a program in C to find ASCII value of capital letters and small letters using continue statement.

#include<conio.h>
#include<stdio.h>
  void main() 
   {
     int ch;
      for(ch=65;ch<=122;ch++)
     {
      if(ch>90&&ch<97)
         continue;
         printf("%d is ASCII value of %c\n",ch,ch);
      }
     getch();
   }

Output:- 


Post a Comment

0 Comments