Find Jobs
Hire Freelancers

Write some Software

$10-30 USD

Fechado
Publicado há quase 8 anos

$10-30 USD

Pago na entrega
#include<stdio.h> int main() { printf("This program creates a magic sqaure of a specified size.\n"); printf("The size must be an odd number between 1 and 99.\n"); int n; printf("Enter size of magic square: "); scanf("%d", &n); int magic[99][99]; int start = (n / 2); // The middle column int max = n * n; magic[0][start] = 1; int row; int col; int next_row; int next_col; int i; for (i = 2, row = 0, col = start; i < max + 1; i++) { if ((row - 1) < 0) { // If going up one will leave the top next_row = n - 1; // Go to the bottom row } else { next_row = row - 1; } // Otherwise go up one printf("In row: %d\n", row); if ((col + 1) > (n - 1)) { // If column will leave the side next_col = 0; // Wrap to first column printf("Column will leave side\n"); } else { next_col = col + 1; } // Otherwise go over one printf("In col: %d\n", col); if (magic[next_row][next_col] > 0) { // If that position is taken if (row > (n - 1)) { // If going to row below leaves bottom next_row = 0; // Go back to the top } else { next_row = row + 1; // Go to the row below next_col = col; // But stay in same column } } row = next_row; col = next_col; printf("About to put %d in row %d, col %d\n", i, row, col); magic[row][col] = i; // Put the current value in that position } // Now let's print the array int j; for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { printf("%4d", magic[i][j]); } printf("\n"); } return 0; }
ID do Projeto: 11213739

Sobre o projeto

9 propostas
Projeto remoto
Ativo há 8 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
9 freelancers estão ofertando em média $22 USD for esse trabalho
Avatar do Usuário
A proposal has not yet been provided
$30 USD em 1 dia
5,0 (625 avaliações)
7,2
7,2
Avatar do Usuário
Please share further details.
$30 USD em 1 dia
4,8 (58 avaliações)
5,8
5,8
Avatar do Usuário
I'm a C and C++ developer and I'm used to work with ANSI code so the generated source code will run in every platform
$25 USD em 1 dia
5,0 (2 avaliações)
0,8
0,8
Avatar do Usuário
I'm the kind to focus more on quality than quantity, I do not hesitate to take the time to improve on my work.
$15 USD em 1 dia
5,0 (1 avaliação)
0,6
0,6
Avatar do Usuário
I am a full time freelancer and have no other job of any kind. I really want to build a serious career on this platform and its my start here so I can work for you upto 16 hours a day & 7 days a week, plus I have 24 hours electricity backup and a reliable fast internet connection. I have done Masters in Information Technology and a specialization in Web Design and Development. There is no issue of money as well you can pay little amount or can pay later if you have financial issue currently. Just Rate my work and give a Honest Review and it will be enough. +I have pretty good mastery in PHP and MySQL +JavaScript, jQuery and AngularJS +Specialized in Responsive Design and AJAX +Expert in WordPress, Joomla, Magento and Drupal +Have strong foundations in Laravel, CodeIgniter, Zend, Yii and CakePHP +HTML5 and CSS3 ***Pay ONLY IF you are 100% Completely Satisfied with work done. If you are not satisfied do not pay at all. Thanks for reading my proposal. Regards, Mubbarik Ali ____________ Recent Reviews of My Clients: “Very quick and accurate work, I was very happy with it :)” -Aidamediagroup (UK) Rating: 5/5 “Very professional Good Communication, timely delivery, quality work” -srayancejain from (US) Rating: 5/5 “mubbarikali was fantastic. He came through again on a quick timeline and continued to work making my document better.” -lou0187 (US) Rating: 5/5
$10 USD em 1 dia
5,0 (2 avaliações)
0,6
0,6
Avatar do Usuário
A proposal has not yet been provided
$23 USD em 1 dia
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) PAKISTAN
Talagang, Pakistan
0,0
0
Membro desde jul. 5, 2016

Verificação do Cliente

Outros trabalhos deste cliente

game development
$10-30 USD
Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.