برنامه نویسی | Programming – Telegram
برنامه نویسی | Programming
40K subscribers
1.75K photos
3.2K videos
437 files
2.64K links
⁦بزرگترین کانال برنامه نویسی تلگرام

تبلیغات
» @Azad_Ads

تماس با ما
» @barnameadmin
Download Telegram
⚠️Language C
⚠️Level = low
©️برنامه‌ای بنویسید که سال تولد کاربر و سال فعلی را از ورودی خوانده، مشخص کند که او چند سال، چند ماه، چند روز، چند ساعت، چند دقیقه و چند ثانیه عمر کرده است©️
🆔 @Azad_Developers
⚠️ Language: C++
🔴🔴 برنامه ای بنویسید که 10 عدد از کاربر گرفته و از بزرگ به کوچک آن را مرتب کند و چاپ کند...
@Azad_Developers
⚠️ Language: C
🔴🔴 برنامه ای بنویسید که 10 عدد از کاربر گرفته و از بزرگ به کوچک آن را مرتب کند و چاپ کند...
@Azad_Developers
🔴🔴 سوالات امتحانی 🔴🔴
🔴🔴برنامه اي بنویسید که صد عدد اعشاري را گرفته و میانگینشان را نمایش دهد...

#include<stdio.h>
void main()
{
double x, m = 0;
int i;
for(i = 0; i < 100; i++)
‌‌ {
scanf("%lf", &x);
m += x;
}
printf("%g\n", m / 100);
}
@Azad_Developers
🔴🔴برنامه ای بنویسید که عدد طبیعی با تعداد رقم مشخصی را گرفته و تعداد ارقامش را محاسبه کند

#include<stdio.h>
void main()
{
int i, x, m = 0;
int counter = 0;
scanf("%d", &x);
for(i = 0; x > 0; i++)
{
m += x % 10;
x /= 10;
++counter;
}
printf("%d ragham darad", counter);
}
@Azad_Developers
🔴🔴برنامه ای بنویسید که n عدد را گرفته و به تعداد آن ، عدد تصادفی چاپ کند ....

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

int main(){
int num;
printf("enter a number\n");
scanf("%d" , &num);
for(int i = 0; i < num ; ++i){
srand(time(0));
int rand = rand();
printf("%d\n" , rand);
}
return 0;
}

@Azad_Developers
🔴🔴برنامه ای بنویسید که عددی را گرفته و اعداد اول کوچکتر از آن را چاپ کند...
@Azad_Developers
🔴🔴برنامه ای بنویسید که عددی را از ورودی گرفته و اول بودن یا نبودن آن را بررسی کند...
@Azad_Developers
🔴🔴برنامه اى بنويسيد که يک عدد را از ورودى خوانده و حاصلضرب ارقام آن را به دست آورد و در خروجى چاپ کند...

#include<stdio.h>
#include<conio.h>
int main(){
int x;
printf("enter a number\n");
scanf("%d" , &x);
int product = 1;
while(x > 0){
product = product * (x%10);
x = x / 10;
}
printf("zarb=%d" , product);
return 0;
}
@Azad_Developers
🔴🔴 برنامه ای بنویسید که عددی را از ورودی گرفته و آن را در مبنای دودویی نمایش دهد...

#include < stdio.h>

void main()
{
long num, decimal_num, remainder, base = 1, binary = 0;

printf("Enter a decimal integer \n");
scanf("%ld", & num);
decimal_num = num;
while (num > 0)
{
  remainder = num % 2;
  binary = binary + remainder * base;
  num = num / 2;
  base = base * 10;
}
printf("Input number is = %d\n", decimal_num);
printf("binary= %ld\n", binary);
}

@Azad_Developers
🔴🔴برنامه ای بنویسید که اعداد دودویی را در اعداد در مبنای ۱۰ ببرد ...

#include < stdio.h >

void main()
{
int num, binary_val, decimal_val = 0, base = 1, rem;

printf("Enter a binary number(1s and 0s) \n");
scanf("%d", & num);
binary_val = num;
while (num > 0)
{
rem = num % 10;
decimal_val = decimal_val + rem * base;
num = num / 10 ;
base = base * 2;
}

printf("The Binary number is = %d \n", binary_val);
printf("Its decimal equivalent is = %d \n", decimal_val);
}

@Azad_Developers
⚠️C++

🔴🔴برنامه ای بنویسید که n عدد از کاربر گرفته و مجموع آن را محاسبه کند...

#include <iostream>
int main()
{
int n, sum = 0, c, value;
cout<<"Enter the number of integers you want to add\n";
cin>>n;
cout<<"Enter"<<n<<"integers"<<"\n";
for (c = 1; c <= n; c++)
{
cin>>value;
sum = sum + value;
}
cout<<"Sum of entered integers ="<<sum<<"\n";
return 0;
}

@Azad_Developers
⚠️C++
🔴🔴برنامه ای بنویسید که با کمک حلقه اعداد ۱ تا ۶ را چاپ کند...

#include <iostream>
using namespace std;

int main ()
{
int a = 1;
while( a < 6 );
{
cout <<"value of a: " << a << endl;
a = a + 1;
}
return 0;
}
@Azad_Developers
⚠️C++ ⚠️C
🔴🔴برنامه ای بنویسید که اعداد دو رقمی که صفر ندارند را چاپ کند
@Azad_Developers
⚠️C++ ⚠️C
🔴🔴برنامه ای بنویسید که n عدد را گرفته و تعداد اعداد مثبت و منفی را چاپ کند...
@Azad_Developers
🔴🔴برنامه ای بنویسید که اعداد زوج کوچکتر از 500 را چاپ کند‌‌‌...
@Azad_Developers
🔴🔴 برنامه ای بنویسید که 100 عدد را از کاربر گرفته و بزرگترین آن و موقعیت آرایه را چاپ کند...

#include <stdio.h>

int main()
{
  int array[100],
maximum,
size,
c,
location = 1;

  printf("Enter the number of elements in array\n");
  scanf("%d", &size);

  printf("Enter %d numbers\n", size);

  for (c = 0; c < size; c++)
  scanf("%d", &array[c]);
  maximum = array[0];

  for (c = 1; c < size; c++)
  {
if (array[c] > maximum)
  {
    maximum = array[c];
    location = c+1;
  }
  }

  printf("Location is %d and it's value is %d.\n", location, maximum);

  return 0;
}

@Azad_Developers
🔴🔴برنامه ای بنویسید که عددی را از کاربر گرفته و تعداد مقسوم الهیه های آن را چاپ کند..‌
@Azad_Developers
🔴🔴برنامه ای بنویسید که عددی از کاربر گرفته و مقسوم الهیه های ان را چاپ کند ....
@Azad_Developers
🔴🔴برنامه ای بنویسید که یک متغیر عمومی را تعریف کرده و مقدار آن را در تابع main تغییر دهد
@Azad_Developers