--> Computer practical -Class 11 Skip to main content

Computer practical -Class 11

Computer programming project-Class 11 


#include<stdio.h>

#include<conio.h>

#include<math.h>

int main()

{

 int aa,bb,n,a,b,sum=0, num[100],c,d,temp, diff,N,rev=0,D,Num,R=0, r,C,m1[10][10],m2[10][10],s[10][10],y,z,f,bin,dec=0,re,p=0,abc;

abc:

printf("\n•Please pick a Choice.");

 printf("\n1. What is this program?\n");

 printf("2.Sum of even numbers of input number.\n");

 printf("3.Checking whether the user input number is palindrome or not\n");

 printf("4.Reversing the user input number\n");

 printf("5.Addition of matrix\n");

 printf("6.Convert the input binary number into equivalent decimal digit\n");

 printf("\n");

 printf("Enter your choice:");

 scanf("%d",&n);

 printf("\n");

 switch(n)

 {

  case 2:

printf("Enter the number upto which you want the sum of:");

  scanf("%d",&b);

  for(a=2;a<=b;a++)

 {

  if (a%2==0)

  sum=sum+a;

 }

 printf("%d\n",sum);

printf("\n");

printf("Would You like to Continue?\n[1 for yes and 0 for no]\n\n");

scanf("%d",&aa);

if(aa==1)

{

goto abc;}

else{

printf("Thanks for being interested in the program!");}


 break;

 case 1:

printf("This program was created by Krishna Sapkota.\n This program contains a total of 5 program combined together.Each program will execute correct answers.\n This is a project work created for NEB practical examination");

 printf("\n");

printf("Would You like to Continue?\n[1 for yes and 0 for no]\n\n");

scanf("%d",&aa);

if(aa==1)

{

goto abc;}

else{

printf("Thanks for being interested in the program!");}


case 3:

  printf("Enter the number:");

 scanf("%d",&N);

f=N;

 while(N!=0)

 {

  diff=N%10;

  rev=rev*10+diff;

  N=N/10;

 }

 if(rev==f)

 {

 printf("The number is palindrome");

}

else {


 printf("The number is not palindrome");

}

printf("\n");

printf("Would You like to Continue?\n[1 for yes and 0 for no]\n\n");

scanf("%d",&aa);

if(aa==1)

{

goto abc;}

else{

printf("Thanks for being interested in the program!");}


break;

 case 4:


   printf("Enter the number:");

 scanf("%D",&Num);


 while(Num!=0)

 {

  D=Num%10;

  R=R*10+D;

  Num=Num/10;

 }

 printf("%d is the reverse of input number",R);

R=0;

printf("\n");

printf("Would You like to Continue?\n[1 for yes and 0 for no]\n\n");

scanf("%d",&aa);

if(aa==1)

{

goto abc;}

else{

printf("Thanks for being interested in the program!");}


 break;

 case 5:

   printf("Enter the number of rows and column you want:");

 scanf("%d%d",&y,&z);

 for(r=0;r<y;r++)

 {

  for(C=0;C<z;C++)

  {

   printf("Enter number for element m1[%d][%d]:",r,C);

   scanf("%d",&m1[r][C]);

  }

 }

    printf("Your first matrix is given below\n");

  for(r=0;r<y;r++)

 {

  for(C=0;C<z;C++)

  {


   printf("%d\t",m1[r][C]);

  }

  printf("\n");

 }

  for(r=0;r<y;r++)

 {

  for(C=0;C<z;C++)

  {

   printf("Eter number for element m2[%d][%d]:",r,C);

   scanf("%d",&m2[r][C]);

}

}


 printf("Your second matrix is given below\n");

  for(r=0;r<y;r++)

 {

  for(C=0;C<z;C++)

  {

  

   printf("%d\t",m2[r][C]);

  }

  printf("\n");

 }

for(r=0;r<y;r++)

{

 for(C=0;C<z;C++)

 {

  s[r][C]=m1[r][C]+m2[r][C];

 }

}

printf("The sum of matrices are given below\n");

for(r=0;r<y;r++)

{

 for(C=0;C<z;C++)

 {

  printf("%d\t",s[r][C]);

 }

 printf("\n");

}

break;

printf("\n");

printf("Would You like to Continue?\n[1 for yes and 0 for no]\n\n");

scanf("%d",&aa);

if(aa==1)

{

goto abc;}

else{

printf("Thanks for being interested in the program!");}


case 6:

 printf("Enter binary number to be converted:");

 scanf("%d",&bin);

 while(bin!=0)

 {

  re=bin%10;

  dec=dec+re*pow(2,p);

  bin=bin/10;

  p++;

 }

 printf("%d is equivalent decimal",dec);

printf("\n");

printf("Would You like to Continue?\n[1 for yes and 0 for no]\n\n");

scanf("%d",&aa);

if(aa==1)

{

goto abc;}

else{

printf("Thanks for being interested in the program!");}


}

}

  ................................................................................................

Comments

Popular posts from this blog

Top 3 Earning Apps In Nepal With eSewa Withdrawal

Top 3 Earning Apps In Nepal With eSewa Withdrawal Earning money online in Nepal is a very much demanded query of Nepali youth and students. It is not that tough to make money online. The only thing you need to make money online is a device that supports internet and determination and Faith. It takes time to make money online . One must be patient and dedicated towards the work in order to achieve the milestone. Due to barriers in international payments from Nepal there are also a limited ways to earn online in Nepal as withdrawing is hard. So in this blog I have bought you three earning apps in Nepal with eSewa withdrawal. Before starting the blog I would like to clear it that if you are reading this article for instant success or instant earnings then this is not the place. First of all Is online earning really possible in Nepal? Certainly! In Nepal, earning money online is possible through blogging, YouTube, cryptocurrency, websites, and more. Tips to enhance your earnings includ...

Start Affiliate Marketing In Nepal In 7 Steps (2024 Latest)

How to start affiliate marketing in Nepal without investment 2024? In this growing era of technology everybody wants to earn money   without investment . One can earn money through various ways which may either be by doing lots of work or by just selling others product aka Affiliate Marketing . Although there are various ways to earn money online among them the most easiest one and the one with no risk is known to be affiliate marketing. If you are a student, a guardian, an employee or a teacher you can start affiliate marketing from scratch after reading this blog. In this blog I will be teaching you how to start affiliate marketing in Nepal from scratch. Everything taught in this blog will be verified assuming you are a newbie to this technology or method of earning online. Table of contents: What is Affiliate Marketing? Is affiliate marketing legal in Nepal? What are the steps to start affiliate marketing in Nepal. How is affiliate marketing done? Who are the parties involve...

50+ TikTok Status And Shayari in Nepali and English

TikTok status In Nepali || Tiktok shayari in Nepali TikTok status in Nepali  TikTok status are very common these days as they become a lyrical way to express our feelings and gratitude. Earn online from TikTok: Easiest way to make money online From TikTok Here are some TikTok status in Nepali : 1. "तिम्रो आँसु, गीतमा बदलिएको, मेरो हृदय रहेछ बसेरी। 🎤 #तिम्रोआँसु #गीत" 2. "साँझको मौसम, तिम्रो यादमा, हेर्दैछु मैले, तिम्रो चेहरा। 🌆 #साँझकीयाद #तिम्रोचेहरा" 3. "आँसुले सजाएको रात, मेरो मनमा बजेको साजा, तिमीले बजाएको राग। 🎶 #रातकासाजा #तिम्रोराग"  4. "तिम्रो आँसु, मेरो छाया, सुन्दैछु रातो बरी रात। 🌙 #तिम्रोआँसु #रातोबरी"  5. "बिछाएको साया, तिम्रो स्पर्श, हेर्दैछु सपनाहरू, बनाएर तिमीसँग बसेरी। 💖 #सायासपना #तिम्रोस्पर्श" 6.  "जीवनको गीत, तिम्रो आँसुमा, तिम्रो हर्षले बोलाउँछ एक पल। 🎵 #गीत #तिम्रोहर्ष" 7. "साँझको रागमा, तिम्रो आँसुहरू, हेर्दैछु मैले, तिम्रो योहरू। 🌆 #साँझकोराग #तिम्रोयोहरू" 8. "तिम्रो आँसु, मेरो मनक...