fa
Feedback
C PROGRAMMING

C PROGRAMMING

رفتن به کانال در Telegram

🚩 Channel was restricted by Telegram

نمایش بیشتر
اطلاعاتی وجود ندارد
مشترکین
-824 ساعت
-347 روز
+8830 روز
آرشیو پست ها
// @C_language_programing

#include<stdio.h>

int main()
{
    int rem,num,i=1,j;
    char Hexa[50];
     
    printf("Enter Decimal no: ");
    scanf("%d", &num);
    
    if(num!=0){
    while(num!=0){
    rem = num % 16;
    
    if(rem<10)
    rem=rem+48;
    
    else
    rem=rem+55;
    
    Hexa[i++]=rem;
    num=num/16;
    }}
    else{
    printf("0");
    }
    printf("\nHexadecimal Number is ");
    for(j=i;0<j;j--){
    printf("%c",Hexa[j]);
    }
    return 0;
}

Jiske pass Laptop nhi hai 👇 Mobile best Compiler's C Compiler Click Here C++ Compiler Click Here Python Compiler Click Here Java Compiler Click Here Sql Compiler Click Here Universal Compilers for mobile Replit (web or app) Click Here Jdoodle(web or app) Click Here Programize (web) Search web For any help Freely Say here

The output of above program is?
Anonymous voting

#include <stdio.h> int main() { int x = 5; int y = x++; printf("%d %d", x, y); return 0; }

Data structures short notes
+8
Data structures short notes

// Area of traingle, circle, square, polygon, angle
#include<stdio.h>

#include<math.h>
main()
{
int choice;
printf("Enter\n1 for Triangle\n2 for Square\n3 for Circle\n4 for Rectangle\n5 for Parallelogram\n");
scanf("%d",&choice);
switch(choice)
{
 case 1: 
{
 int a,b,c;
 float s,area;
 printf("Enter sides of triangle\n");
 scanf("%d %d %d",&a,&b,&c);
 s=(float)(a+b+c)/2;
 area=(float)(sqrt(s*(s-a)*(s-b)*(s-c)));
 printf("Area of Triangle with sides %d,%d,%d is %f\n",a,b,c,area);
 break;
 
}
 case 2: 
{
 float side,area;
 printf("Enter Sides of Square\n");
 scanf("%f",&side);
 area=(float)side*side;
 printf("Area of Square is %f\n",area);
 break;
 
}
 case 3: 
{
 float radius,area;
 printf("Enter Radius of Circle\n");
 scanf("%f",&radius);
 area=(float)3.14159*radius*radius;
 printf("Area of Circle with radius %f is %f\n",radius,area);
 break;
 
}
 case 4: 
{
 float len,breadth,area;
 printf("Enter Length and Breadth of Rectangle\n");
 scanf("%f %f",&len,&breadth);
 area=(float)len*breadth;
 printf("Area of Rectangle is %f\n",area);
 break;
 
}
 case 5: 
{
 float base,height,area;
 printf("Enter base and height of Parallelogram\n");
 scanf("%f %f",&base,&height);
 area=(float)base*height;
 printf("Enter area of Parallelogram is %f\n",area);
 break;
 
}
 default: 
{
 printf("Invalid Choice\n");
 break;
 
}

}

}

C LANGUAGE shorts important notes
+9
C LANGUAGE shorts important notes

C LANGUAGE complete 💯 notes Topic wise 👆👆👆

31_With_arguments_with_return_value_Functions_C_Programming_Language.pdf3.99 KB

+6
40- Introduction to Structure - C Programming Language.pdf5.09 KB

+3
27- Functions-Introduction- C Programming Language.pdf6.38 KB

+6
10_Printing_int,_float,_char_Data_Types_C_Programming_Language_Tutorials.pdf4.21 KB

+9
20- Iterative Statement- For Loop- C Programming Language.pdf5.09 KB

// Program to print sum of three numbers and also find maximum of three
void sumAndMax(int ,int ,int ,int*,int*);
#include<stdio.h>
int main()
{
    int a=50,b=90,c=20,sum,max;
    sumAndMax(a,b,c,&sum,&max);
    printf("Sum= %d , Maximum number= %d",sum,max);
    return 0;
}
void sumAndMax(int x,int y,int z,int *p,int *q){
    *p=x+y+z;
    *q=(x>y && x>z)?x:(y>z?y:z);  // greatest of three numbers using ternary operator
}

photo content

Program to calculate distance between two points.
-----------------------------------------------------
Program:
  #include<stdio.h>
  #include<math.h>
   int main()
  { float x1,x2,y1,y2,distance;
    printf("Enter coardinates of first point(x1,y1):\n");
    scanf("%f%f",&x1,&y1);
    printf("Enter coordinates of second point(x2,y2):\n");
    scanf("%f%f",&x2,&y2);
    distance=sqrt(pow((x2-x1),2)+pow((y2-y1),2));
   printf ("Distance=%.2f",distance);
        return 0;
}
-----------------------------------------------------------
#basicprograms

🔰 join ᴏᴜʀ ᴀʟʟ ᴄʜᴀɴɴᴇʟs for coding 🔰 ᴛᴇʀᴍᴜx ʜᴀᴄᴋɪɴɢ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴛᴇʀᴍᴜx ᴄᴏᴍᴍᴀɴᴅ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴛᴇʀᴍᴜx ᴛʀɪᴄᴋs ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴘʜᴘ ʟᴀɴɢᴜᴀɢᴇs ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴄ ᴘʀᴏɢʀᴀᴍᴍɪɴɢ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴄ++ ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴄ# ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴊᴀᴠᴀ ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴄss ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴘʏᴛʜᴏɴ ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴛʏᴘᴇsᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴊᴀᴠᴀsᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ ʜᴛᴍʟ ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ

// #8 Fibonachi series
#include <stdio.h>
int main()
{
    int a=0,b=1,c=1,n;
    printf("Enter no.: ");    
    scanf("%d",&n);
    printf("The series is:\n");
    for(int i=1;i<=n;i++)
    {
        printf("%d ",c);
        c=a+b;
        a=b;
        b=c;
    }
    return 0;
}

// calculate bonus on salary
#include<stdio.h>

#include<string.h>
main()
{
int i,j;
float salary,bonus;
char gender;
printf("Enter M for Male and F for Femalen");
scanf("%c",&gender);
printf("Enter Salaryn");
scanf("%f",&salary);
if(gender=='M' || gender=='m') 
{
if(salary>10000) bonus=(float)(salary*0.05);
//0.05--5% else bonus=(float)(salary*0.07);

}
if(gender=='F' || gender=='f') 
{
if(salary>10000) bonus=(float)(salary*0.1);
//0.1--10% else bonus=(float)(salary*0.12);

}
salary+=bonus;
printf("Bonus=%.2fnSalary=%.2fn",bonus,salary);

}

Program to print asci value of the character: Program - ---------------------------------------------------- #include<stdio.h> int main() {char ch; printf("Enter any character:"); scanf("%c",&ch); printf("The ascii value of %c is %d",ch,ch); return 0; } ------------------------------------------------------ #basicprograms