DEV Community

thequvonc
thequvonc

Posted on

C ++ DA RAQAMLARNI BOLISH KOPAYTIRISH VA FOIZINI CHIQARISH!





#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int N;
 cin >> N;
  cout << "Sun Mon Tue Wed Thu Fri Sat" << endl;
cout << setw (3)<< N;
N=N % 31+1;
cout << setw (4)<< N;
N=N % 31 + 1;
cout << setw (4)<< N;
N =N % 31 + 1;
cout << setw (4)<< N;
N=N % 31 + 1;
cout << setw (4)<< N;
N=N % 31 + 1;
cout << setw (4)<< N;
N=N % 31 + 1;
std::cout << setw (4)<< N;
   return 0;
  }


Enter fullscreen mode Exit fullscreen mode

biz bugun c++ da sonlarni kopaytirish bolish va foizini chiqarishni organdik.
hop endi c++ dagi aperatorlar maktabda oqitiladigan matematikadagi aperatorlar (+,/,*,-) lar bilan bir hil.
% - byu sonning boluvdagi yo kopaytiruvdagi javobning ortib qolishi.
masalan: 10 % 3 = 1
KASR SONLAR - yani bu (10) bu notogri kasr!
(--)
(3)
agar shu kasr sonning teskarisi bolganida bu togri kars bolardi!

@dawrounn

Top comments (0)